public abstract class Pattern extends Object
Modifier and Type | Field and Description |
---|---|
static char |
ESC
The ESC character, the user can provide his own value
for the escape character through regex.esc
|
Constructor and Description |
---|
Pattern() |
Modifier and Type | Method and Description |
---|---|
Pattern |
add(Pattern p)
add a Pattern to the singly-linked Pattern chain.
|
patInt |
countMaxChars()
return maximum number of characters in pattern
|
patInt |
countMinChars()
return minimum number of characters in pattern
|
boolean |
equals(Object o)
Returns if this object is considered equal to the other object.
|
Pattern |
getNext()
This gets the next element of a Pattern that
we wish to match.
|
int |
match(StringLike s,
Pthings pt)
This can be used to perform a match test from
within class Pattern.
|
int |
matchAt(StringLike s,
int i,
Pthings pt)
This can be used to perform a match test from
within class Pattern.
|
abstract int |
matchInternal(int i,
Pthings p)
The interal match function, it must be provided by any
class which wishes to extend Pattern.
|
patInt |
maxChars()
The maximum number of characters which
this pattern element can match.
|
patInt |
minChars()
The minimum number of characters which
this pattern element can match.
|
int |
nextMatch(int i,
Pthings pt)
This determines if the remainder of a Pattern
matches.
|
String |
nextString()
This is a toString() for the remainder
of the Pattern elements after this one.
|
void |
setParent(Pattern p)
Call this method if you have a pattern element that
takes a sub pattern (such as Or), and
after you have added a sub pattern to the current
pattern element.
|
abstract String |
toString()
Return a String representation of this object.
|
public static final char ESC
public abstract int matchInternal(int i, Pthings p)
public abstract String toString()
Object
public Pattern getNext()
public void setParent(Pattern p)
public int nextMatch(int i, Pthings pt)
public String nextString()
public int match(StringLike s, Pthings pt)
public int matchAt(StringLike s, int i, Pthings pt)
public patInt minChars()
public patInt maxChars()
public final patInt countMinChars()
public final patInt countMaxChars()