|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.raelity.text.RegExpResult
public abstract class RegExpResult
This class hold the results of a regular expression pattern against an input. It is useful for saving the result of RegExp.search before performing another search. These same methods are available in RegExp.
This class is not a superclass of RegExp, even though all the methods of this class appear in and have identical function to methods in RegExp, because there could be negative implications on performance depending on the regular expression implementation.
Constructor Summary | |
---|---|
RegExpResult()
|
Method Summary | |
---|---|
abstract String |
group(int i)
Retrive backreference (matching string in the input) for the ith set of parenthesis in the pattern. |
abstract boolean |
isMatch()
Check if the associated search produced a match. |
abstract int |
length(int i)
The length of the of corresponding backreference. |
abstract int |
nGroup()
Return the number of backreferences. |
abstract int |
start(int i)
The returned value is the offset from the beginning of the input to where the ith backreference starts. |
abstract int |
stop(int i)
The returned value is the offset from the beginning of the input to where the ith backreference ends. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RegExpResult()
Method Detail |
---|
public abstract boolean isMatch()
public abstract int nGroup()
public abstract String group(int i)
public abstract int length(int i)
public abstract int start(int i)
public abstract int stop(int i)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |