|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object pobs.PMatch
Immutable class which contains information on success/failure and the length/point-of-failure of a parse.
Field Summary | |
static PMatch |
FALSE
Convenient constant for single character parsers. |
static PMatch |
TRUE
Convenient constant for single character parsers. |
Constructor Summary | |
PMatch(boolean match,
long length)
Sole constructor. |
Method Summary | |
long |
getLength()
Returns the length of the successfull match or the length of the input which could be matched in case of failure. |
boolean |
isMatch()
Check whether the match was successful. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final PMatch TRUE
public static final PMatch FALSE
Constructor Detail |
public PMatch(boolean match, long length)
match
- specifies whether the match is succesful or failedlength
- the length of either the success or exact point of failure. In
case of a failure, the length needs not be the exact point but
doing so will allow the client code to know exactly where a
parser failed. POBS' own parsers are all guarenteed to return
the exact point of failure.Method Detail |
public long getLength()
public boolean isMatch()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |