Class InlineMatch.DataMatch
java.lang.Object
com.samsthenerd.inline.api.matching.InlineMatch.DataMatch
- All Implemented Interfaces:
InlineMatch
- Enclosing interface:
InlineMatch
A match representing some data.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.samsthenerd.inline.api.matching.InlineMatch
InlineMatch.DataMatch, InlineMatch.TextMatch -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDataMatch(InlineData data) Makes a DataMatch with the given dataDataMatch(InlineData data, net.minecraft.text.Style style) Makes a DataMatch with the given data and style -
Method Summary
Modifier and TypeMethodDescriptionintaccept(net.minecraft.text.CharacterVisitor visitor, int index, net.minecraft.text.Style currentStyle) Supplies styled charactersintGets the length of this match
-
Field Details
-
data
-
style
public final net.minecraft.text.Style style
-
-
Constructor Details
-
DataMatch
Makes a DataMatch with the given data and style- Parameters:
data-style-
-
DataMatch
Makes a DataMatch with the given data- Parameters:
data-
-
-
Method Details
-
accept
public int accept(net.minecraft.text.CharacterVisitor visitor, int index, net.minecraft.text.Style currentStyle) Description copied from interface:InlineMatchSupplies styled characters- Specified by:
acceptin interfaceInlineMatch- Parameters:
visitor- accepts the styled charactersindex- the number of characters given to this visitor so farcurrentStyle- the style that this text would otherwise have.- Returns:
- the number of characters supplied to the visitor.
-
charLength
public int charLength()Description copied from interface:InlineMatchGets the length of this match- Specified by:
charLengthin interfaceInlineMatch- Returns:
- the number of characters we plan to give the visitor.
-