Class SkriptPattern
java.lang.Object
ch.njol.skript.patterns.SkriptPattern
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceProperties to consider when stringifying a pattern. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintCount the maximum amount of non-null types in this pattern, i.e.int<T extends PatternElement>
List<T> getElements(Class<T> type) A method to obtain a list of all pattern elements of a specified type that are represented by this SkriptPattern.@Nullable MatchResult@Nullable MatchResultmatch(String expr, int flags, ParseContext parseContext) toString()toString(SkriptPattern.StringificationProperties properties) Stringifies this pattern.
-
Constructor Details
-
SkriptPattern
-
-
Method Details
-
match
-
match
-
countTypes
public int countTypes()- Returns:
- the size of the
MatchResult.expressionsarray from a match.
-
countNonNullTypes
public int countNonNullTypes()Count the maximum amount of non-null types in this pattern, i.e. the maximum amount of non-null values in theMatchResult.expressionsarray from a match.- See Also:
-
getElements
A method to obtain a list of all pattern elements of a specified type that are represented by this SkriptPattern.- Type Parameters:
T- The type of pattern element.- Parameters:
type- The type of pattern elements to obtain.- Returns:
- A list of all pattern elements of the specified type represented by this SkriptPattern.
-
toString
Stringifies this pattern.- Parameters:
properties- The properties to consider during stringification.- Returns:
- A string representing this pattern.
-
toString
-