|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.isi.pegasus.planner.selector.replica.Regex.Rank
private class Regex.Rank
A Data class that allows us to compile a regex expression and associate a rank value with it.
| Field Summary | |
|---|---|
private Pattern |
mPattern
The compiled regex expression |
private int |
mRank
The rank value. |
| Constructor Summary | |
|---|---|
Regex.Rank(int rank,
String regex)
The default constructor. |
|
| Method Summary | |
|---|---|
int |
compareTo(Object o)
Compares the Rank object with another rank object. |
int |
getRank()
Returns the rank associated with it. |
Pattern |
getRegex()
Returns the underlying regex pattern associated with the Rank object. |
boolean |
matches(String input)
Matches a string against the compiled regex expression |
String |
toString()
Returns the textual representation of this |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private int mRank
private Pattern mPattern
| Constructor Detail |
|---|
public Regex.Rank(int rank,
String regex)
rank - The rank value.regex - The regex expression.| Method Detail |
|---|
public boolean matches(String input)
input - the input string to be matched
public Pattern getRegex()
public int getRank()
public int compareTo(Object o)
compareTo in interface Comparableo - the object to be compared.
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||