java.lang.Object
java.lang.Record
org.kink_lang.kink.internal.program.lex.EotToken
- Record Components:
textLength- the length of the program text.
- All Implemented Interfaces:
Token
A special token which indicates the end-of-text.
The token is always on the end of the program text, and is zero-width. Thus getTextLength, getStartPos, and getEndPos always the return equal value.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintendPos()Returns the position index on which the token ends.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intstartPos()Returns the position index on which the token starts.intReturns the value of thetextLengthrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
EotToken
public EotToken(int textLength) Creates an instance of aEotTokenrecord class.- Parameters:
textLength- the value for thetextLengthrecord component
-
-
Method Details
-
startPos
public int startPos()Description copied from interface:TokenReturns the position index on which the token starts. -
endPos
public int endPos()Description copied from interface:TokenReturns the position index on which the token ends. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='. -
textLength
public int textLength()Returns the value of thetextLengthrecord component.- Returns:
- the value of the
textLengthrecord component
-