Package ch.njol.skript.util
Class Patterns<T>
java.lang.Object
ch.njol.skript.util.Patterns<T>
A helper class useful when a expression/condition/effect/etc. needs to associate additional data with each pattern.
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
Patterns
- Parameters:
info
- An array which must be like {{String, T}, {String, T}, ...}
-
-
Method Details
-
getPatterns
-
getInfo
- Parameters:
matchedPattern
- The pattern to get the data to as given inSyntaxElement.init(Expression[], int, Kleenean, ParseResult)
- Returns:
- The info associated with the matched pattern
- Throws:
ClassCastException
- If the item in the source array is not of the requested type
-