private static class Regex.Rank
extends java.lang.Object
implements java.lang.Comparable
| Modifier and Type | Field and Description |
|---|---|
private java.util.regex.Pattern |
mPattern
The compiled regex expression
|
private int |
mRank
The rank value.
|
| Constructor and Description |
|---|
Rank(int rank,
java.lang.String regex)
The default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(java.lang.Object o)
Compares the Rank object with another rank object.
|
int |
getRank()
Returns the rank associated with it.
|
java.util.regex.Pattern |
getRegex()
Returns the underlying regex pattern associated with the Rank object.
|
boolean |
matches(java.lang.String input)
Matches a string against the compiled regex expression
|
java.lang.String |
toString()
Returns the textual representation of this
|
private int mRank
private java.util.regex.Pattern mPattern
public Rank(int rank,
java.lang.String regex)
rank - The rank value.regex - The regex expression.public boolean matches(java.lang.String input)
input - the input string to be matchedpublic java.util.regex.Pattern getRegex()
public int getRank()
public int compareTo(java.lang.Object o)
compareTo in interface java.lang.Comparableo - the object to be compared.public java.lang.String toString()
toString in class java.lang.Object