Package ch.njol.skript.util
Class EnumUtils<E extends Enum<E>>
java.lang.Object
ch.njol.skript.util.EnumUtils<E>
- Type Parameters:
E
- Generic representing the Enum.
A language utility class to be used for easily handling language values representing an Enum.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionThis method attempts to match the string input against one of the string representations of the enumerators.This method returns the string representation of an enumerator.toString
(E enumerator, StringMode flag) This method returns the string representation of an enumerator
-
Constructor Details
-
EnumUtils
-
-
Method Details
-
parse
This method attempts to match the string input against one of the string representations of the enumerators.- Parameters:
input
- a string to attempt to match against one the enumerators.- Returns:
- The enumerator matching the input, or null if no match could be made.
-
toString
This method returns the string representation of an enumerator.- Parameters:
enumerator
- The enumerator to represent as a string.flags
- not currently used- Returns:
- A string representation of the enumerator.
-
toString
This method returns the string representation of an enumerator- Parameters:
enumerator
- The enumerator to represent as a stringflag
- not currently used- Returns:
- A string representation of the enumerator
-
getAllNames
- Returns:
- A comma-separated string containing a list of all names representing the enumerators. Note that some entries may represent the same enumerator.
-