Class CompoundElement
java.lang.Object
io.github.syst3ms.skriptparser.pattern.CompoundElement
- All Implemented Interfaces:
PatternElement
Multiple
PatternElements put together in order.-
Constructor Summary
ConstructorsConstructorDescriptionCompoundElement(PatternElement... elements) Only used for unit testsCompoundElement(List<PatternElement> elements) -
Method Summary
Modifier and TypeMethodDescriptionbooleanintmatch(String s, int index, MatchContext context) Attempts to match thePatternElementto a string at a specified index.toString()
-
Constructor Details
-
CompoundElement
-
CompoundElement
Only used for unit tests
-
-
Method Details
-
getElements
-
equals
-
match
Description copied from interface:PatternElementAttempts to match thePatternElementto a string at a specified index. About the index, make sure to never increment the index by some arbitrary value when returning- Specified by:
matchin interfacePatternElement- Parameters:
s- the string to match this PatternElement againstindex- the index of the string at which this PatternElement should be matched- Returns:
- the index at which the matching should continue afterwards if successful. Otherwise, -1
-
toString
-