Enum Class EnumSelector

java.lang.Object
java.lang.Enum<EnumSelector>
com.univocity.parsers.conversions.EnumSelector
All Implemented Interfaces:
Serializable, Comparable<EnumSelector>, Constable

public enum EnumSelector extends Enum<EnumSelector>
Identifies a property of an enumeration that should be used by EnumOptions to identify an input value. When parsing a given input, values will be compared against one of the properties and if there's a match, the corresponding enumeration value will be used to set the field of an annotated class.
  • Enum Constant Details

    • ORDINAL

      public static final EnumSelector ORDINAL
      Matches the result of Enum.ordinal()
    • NAME

      public static final EnumSelector NAME
      Matches the result of Enum.name()
    • STRING

      public static final EnumSelector STRING
      Matches the result of Enum.toString() ()}
    • CUSTOM_FIELD

      public static final EnumSelector CUSTOM_FIELD
      Matches the value of a field of the annotated enumeration
    • CUSTOM_METHOD

      public static final EnumSelector CUSTOM_METHOD
      Matches the value of a method of the annotated enumeration
  • Constructor Details

    • EnumSelector

      private EnumSelector()
  • Method Details

    • values

      public static EnumSelector[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static EnumSelector valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null