Class InlineMatch.TextMatch
java.lang.Object
com.samsthenerd.inline.api.matching.InlineMatch.TextMatch
- All Implemented Interfaces:
InlineMatch
- Enclosing interface:
- InlineMatch
A match representing some text.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.samsthenerd.inline.api.matching.InlineMatch
InlineMatch.DataMatch, InlineMatch.TextMatch -
Constructor Summary
ConstructorsConstructorDescriptionTextMatch(net.minecraft.text.Text text) Makes a TextMatch with the given text -
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
-
Constructor Details
-
TextMatch
public TextMatch(net.minecraft.text.Text text) Makes a TextMatch with the given text- Parameters:
text-
-
-
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.
-