Class Token
java.lang.Object
net.kyori.adventure.text.minimessage.internal.parser.Token
Represents a token for the lexer.
- Since:
- 4.10.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the children of this token.voidchildTokens(List<Token> childTokens) Sets the children of this token.intendIndex()Returns the end index of this token.booleanget(CharSequence message) Get the value of this token from the complete message.inthashCode()intReturns the start index of this token.toString()type()Returns the type of this token.
-
Constructor Details
-
Token
Creates a new token.- Parameters:
startIndex- the start index of the tokenendIndex- the end index of the tokentype- the type of the token- Since:
- 4.10.0
-
-
Method Details
-
startIndex
public int startIndex()Returns the start index of this token.- Returns:
- the start index
- Since:
- 4.10.0
-
endIndex
public int endIndex()Returns the end index of this token.- Returns:
- the end index
- Since:
- 4.10.0
-
type
Returns the type of this token.- Returns:
- the type
- Since:
- 4.10.0
-
childTokens
Returns the children of this token.- Returns:
- the child tokens
- Since:
- 4.10.0
-
childTokens
Sets the children of this token.- Parameters:
childTokens- the new children- Since:
- 4.10.0
-
get
Get the value of this token from the complete message.- Parameters:
message- the message to read- Returns:
- the value of this token
- Since:
- 4.10.0
-
equals
-
hashCode
public int hashCode() -
toString
-