Constructor and Description |
---|
EnumConverter(Class<T> enumType)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static Converter<?,?> |
createEnumArrayConverter(Class<? extends Enum<?>> enumType,
int dimensions)
Create a
Converter for arrays based on converting the base elements with an EnumConverter . |
static EnumConverter<?> |
createEnumConverter(Class<? extends Enum<?>> enumType)
Convenience "constructor" allowing wildcard caller
Enum types. |
protected T |
doBackward(EnumValue enumValue) |
protected EnumValue |
doForward(T value) |
boolean |
equals(Object obj) |
Class<T> |
getEnumType()
Get the
Enum type associated with this instance. |
int |
hashCode() |
String |
toString() |
andThen, apply, convert, convertAll, from, identity, reverse
public EnumConverter(Class<T> enumType)
enumType
- Enum
typeIllegalArgumentException
- if enumType
is nullpublic Class<T> getEnumType()
Enum
type associated with this instance.Enum
typepublic static EnumConverter<?> createEnumConverter(Class<? extends Enum<?>> enumType)
Enum
types.enumType
- type for the created converterpublic static Converter<?,?> createEnumArrayConverter(Class<? extends Enum<?>> enumType, int dimensions)
Converter
for arrays based on converting the base elements with an EnumConverter
.enumType
- base enum typedimensions
- number of array dimensionsIllegalArgumentException
- if enumType
is nullIllegalArgumentException
- if dimemsions
is not between 1 and 255 (inclusive)public boolean equals(Object obj)
Copyright © 2022. All rights reserved.