Package org.nineml.coffeegrinder.tokens
Class TokenEPSILON
- java.lang.Object
-
- org.nineml.coffeegrinder.util.Decoratable
-
- org.nineml.coffeegrinder.tokens.Token
-
- org.nineml.coffeegrinder.tokens.TokenEPSILON
-
-
Field Summary
Fields Modifier and Type Field Description static TokenEPSILONEPSILON
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)Test tokens for equality.java.lang.StringgetValue()Return the string value of this token.inthashCode()Assure that equal tokens return the same hash code.booleanmatches(Token input)Does this token match the input?java.lang.StringtoString()Pretty print a token.-
Methods inherited from class org.nineml.coffeegrinder.util.Decoratable
addAttribute, addAttributes, getAttribute, getAttributes, getAttributesMap, getAttributeValue, hasAttribute
-
-
-
-
Field Detail
-
EPSILON
public static final TokenEPSILON EPSILON
-
-
Method Detail
-
getValue
public java.lang.String getValue()
Return the string value of this token.
-
matches
public boolean matches(Token input)
Does this token match the input?This token matches other
token charactersthat have the same character as well asTokenStringsthat are one character long and contain the same character.
-
equals
public boolean equals(java.lang.Object obj)
Test tokens for equality.Two tokens are equal if they represent the same character.
- Overrides:
equalsin classjava.lang.Object- Parameters:
obj- An object.- Returns:
- true if
objis equal to this terminal character.
-
hashCode
public int hashCode()
Assure that equal tokens return the same hash code.- Overrides:
hashCodein classjava.lang.Object- Returns:
- the hash code.
-
toString
public java.lang.String toString()
Pretty print a token.- Overrides:
toStringin classjava.lang.Object- Returns:
- a string representation of the object.
-
-