Package org.jparsec
Class Token
- java.lang.Object
-
- org.jparsec.Token
-
public final class Token extends java.lang.ObjectRepresents any token with a token value and the 0-based index in the source.
-
-
Constructor Summary
Constructors Constructor Description Token(int index, int length, java.lang.Object value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)private booleanequalToken(Token that)inthashCode()intindex()Returns the index of the token in the original source.intlength()Returns the length of the token.java.lang.StringtoString()Returns the string representation of the token value.java.lang.Objectvalue()Returns the token value.
-
-
-
Method Detail
-
length
public int length()
Returns the length of the token.
-
index
public int index()
Returns the index of the token in the original source.
-
value
public java.lang.Object value()
Returns the token value.
-
toString
public java.lang.String toString()
Returns the string representation of the token value.- Overrides:
toStringin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
equalToken
private boolean equalToken(Token that)
-
-