Enum EnumSelector
- java.lang.Object
-
- java.lang.Enum<EnumSelector>
-
- com.univocity.parsers.conversions.EnumSelector
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<EnumSelector>
public enum EnumSelector extends java.lang.Enum<EnumSelector>
Identifies a property of an enumeration that should be used byEnumOptions
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 Summary
Enum Constants Enum Constant Description CUSTOM_FIELD
Matches the value of a field of the annotated enumerationCUSTOM_METHOD
Matches the value of a method of the annotated enumerationNAME
Matches the result ofEnum.name()
ORDINAL
Matches the result ofEnum.ordinal()
STRING
Matches the result ofEnum.toString()
()}
-
Constructor Summary
Constructors Modifier Constructor Description private
EnumSelector()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static EnumSelector
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static EnumSelector[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ORDINAL
public static final EnumSelector ORDINAL
Matches the result ofEnum.ordinal()
-
NAME
public static final EnumSelector NAME
Matches the result ofEnum.name()
-
STRING
public static final EnumSelector STRING
Matches the result ofEnum.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
-
-
Method Detail
-
values
public static EnumSelector[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (EnumSelector c : EnumSelector.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static EnumSelector valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-