Class EnumUtils<E extends Enum<E>>

java.lang.Object
ch.njol.skript.util.EnumUtils<E>

@Deprecated(since="2.12", forRemoval=true) public final class EnumUtils<E extends Enum<E>> extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
Use EnumParser instead.
  • Constructor Summary

    Constructors
    Constructor
    Description
    EnumUtils(Class<E> enumClass, String languageNode)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    parse(String input)
    Deprecated, for removal: This API element is subject to removal in a future version.
    This method attempts to match the string input against one of the string representations of the enumerators.
    toString(E enumerator, int flags)
    Deprecated, for removal: This API element is subject to removal in a future version.
    This method returns the string representation of an enumerator.
    toString(E enumerator, StringMode flag)
    Deprecated, for removal: This API element is subject to removal in a future version.
    This method returns the string representation of an enumerator

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • EnumUtils

      public EnumUtils(Class<E> enumClass, String languageNode)
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • parse

      @Nullable public E parse(String input)
      Deprecated, for removal: This API element is subject to removal in a future version.
      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

      public String toString(E enumerator, int flags)
      Deprecated, for removal: This API element is subject to removal in a future version.
      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

      public String toString(E enumerator, StringMode flag)
      Deprecated, for removal: This API element is subject to removal in a future version.
      This method returns the string representation of an enumerator
      Parameters:
      enumerator - The enumerator to represent as a string
      flag - not currently used
      Returns:
      A string representation of the enumerator
    • getAllNames

      public String getAllNames()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns:
      A comma-separated string containing a list of all names representing the enumerators. Note that some entries may represent the same enumerator.