|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.millscript.commons.util.list.AbstractIList<V>
org.millscript.commons.util.list.IArrayList<java.lang.String>
org.millscript.millscript.datatypes.Binding
public final class Binding
This class represents a MillScript Binding, which itself reprsents the set of match variables for a given regular expression and string.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.millscript.commons.util.list.AbstractIList |
|---|
org.millscript.commons.util.list.AbstractIList.ListMapletIterator<V>, org.millscript.commons.util.list.AbstractIList.ListMapletList<V> |
| Method Summary | |
|---|---|
java.lang.String |
getMatchedString()
Returns the section of the original string matched by the regular expression used to make this binding. |
java.lang.Integer |
getMatchedStringEnd()
Returns the index in the original string of the last character of the matched section. |
java.lang.Integer |
getMatchedStringStart()
Returns the index in the original string of the first character of the matched section. |
java.lang.String |
getMatchVar(int n)
Returns the binding for the specified match variable. |
java.lang.Integer |
getMatchVarEnd(int n)
Returns the index in the original string of the last character of the specified match variable. |
java.lang.Integer |
getMatchVarStart(int n)
Returns the index in the original string of the first character of the specified match variable. |
java.lang.String |
getOriginalString()
Returns the original string the regex was matched against. |
java.util.regex.Pattern |
getPattern()
Returns the pattern used to make this binding. |
static Binding |
newBinding(java.lang.String s,
java.util.regex.Matcher m)
Returns a new binding for the specified matcher. |
void |
validateMatchVarReference(int n)
Validates the specified integer as a match variable reference, generating an alert if the refernce is not valid. |
| Methods inherited from class org.millscript.commons.util.list.IArrayList |
|---|
clone, doGet, doSlice, indexOf, iterator, size, toArray |
| Methods inherited from class org.millscript.commons.util.list.AbstractIList |
|---|
allButFirst, allButLast, allFirst, allLast, contains, contains, contains, contains0, contains0, contains0, containsAll, containsKey, containsKey, containsKey0, containsKey0, containsSlice, containsSlice0, containsValue, decorate, equals, first, get, get, get0, get0, getDefault, hashCode, indexOf0, isEmtpy, keyList, last, mapletList, setDefault, setDefault, sharedMapletList, sharedValueList, slice, slice0, toArray, toString, valueList |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static final Binding newBinding(java.lang.String s,
java.util.regex.Matcher m)
s - the original string that was matched againstm - the matcher to make a binding frompublic java.lang.String getMatchedString()
public java.lang.Integer getMatchedStringEnd()
public java.lang.Integer getMatchedStringStart()
public java.lang.String getMatchVar(int n)
n - the match variable to get
public java.lang.Integer getMatchVarEnd(int n)
public java.lang.Integer getMatchVarStart(int n)
public java.lang.String getOriginalString()
public java.util.regex.Pattern getPattern()
public void validateMatchVarReference(int n)
n - the match variable reference to validate
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||