Class EnumParser<E extends Enum<E>>

java.lang.Object
ch.njol.skript.config.EnumParser<E>
All Implemented Interfaces:
Converter<String,​E>

public class EnumParser<E extends Enum<E>> extends Object implements Converter<String,​E>
  • Constructor Details

    • EnumParser

      public EnumParser(Class<E> enumType, String type)
  • Method Details

    • convert

      public @Nullable E convert(String s)
      Description copied from interface: Converter
      Converts an object from the given to the desired type.
      Specified by:
      convert in interface Converter<String,​E extends Enum<E>>
      Parameters:
      s - The object to convert.
      Returns:
      the converted object
    • toString

      public String toString()
      Overrides:
      toString in class Object