Class MatchedTokenConsumer<T>
java.lang.Object
net.kyori.adventure.text.minimessage.internal.parser.match.MatchedTokenConsumer<T>
- Type Parameters:
T- the return result
- Direct Known Subclasses:
StringResolvingMatchedTokenConsumer, TokenListProducingMatchedTokenConsumer
A consumer of a region of a string that was identified as a token.
- Since:
- 4.10.0
-
Field Details
-
input
-
-
Constructor Details
-
MatchedTokenConsumer
Creates a new matched token consumer.- Parameters:
input- the input- Since:
- 4.10.0
-
-
Method Details
-
accept
Accepts a matched token.- Parameters:
start- the start of the tokenend- the end of the tokentokenType- the type of the token- Since:
- 4.10.0
-
result
Gets the result of this consumer, if any.- Returns:
- the result
- Since:
- 4.10.0
-
lastEndIndex
public final int lastEndIndex()The last accepted end index, or-1if no match has been accepted.- Returns:
- the last accepted end index
- Since:
- 4.10.0
-