Package org.jparsec
Class Token
- java.lang.Object
-
- org.jparsec.Token
-
public final class Token extends java.lang.Object
Represents 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 boolean
equals(java.lang.Object obj)
private boolean
equalToken(Token that)
int
hashCode()
int
index()
Returns the index of the token in the original source.int
length()
Returns the length of the token.java.lang.String
toString()
Returns the string representation of the token value.java.lang.Object
value()
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:
toString
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
equalToken
private boolean equalToken(Token that)
-
-