Enum instances.
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private static final Map |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static <T extends Enum | |
| public static Field | |
| public static <T extends Enum | getIfPresent(Class<T> enumClass, String value)
Returns an optional enum constant for the given type, using |
| private static <T extends Enum | |
| public static <T extends Enum | stringConverter(Class<T> enumClass)
Returns a serializable converter that converts between strings and |
| enumConstantCache | back to summary |
|---|---|
| private static final Map<Class<? extends Enum<?>>, Map<String, WeakReference<? extends Enum<?>>>> enumConstantCache
| |
| Enums | back to summary |
|---|---|
| private Enums() | |
| getEnumConstants | back to summary |
|---|---|
pack-priv static <T extends Enum
| |
| getField | back to summary |
|---|---|
| public static Field getField(Enum<?> enumValue) Returns the
| |
| getIfPresent | back to summary |
|---|---|
| public static <T extends Enum Returns an optional enum constant for the given type, using
| |
| populateCache | back to summary |
|---|---|
private static <T extends Enum
| |
| stringConverter | back to summary |
|---|---|
| public static <T extends Enum Returns a serializable converter that converts between strings and
| |
| Modifier and Type | Field and Description |
|---|---|
| private final Class | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| protected String | doBackward(T
the instance to convert; will never be null enumValue)Implements abstract com. b as an instance of type A.
|
| protected T | doForward(String
the instance to convert; will never be null value)Implements abstract com. a as an instance of type B.
|
| public boolean | equals(Object
the reference object with which to compare. object)Overrides com. Implements com. |
| public int | |
| public String |
| enumClass | back to summary |
|---|---|
| private final Class<T> enumClass | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| StringConverter | back to summary |
|---|---|
| pack-priv StringConverter(Class<T> enumClass) | |
| doBackward | back to summary |
|---|---|
| protected String doBackward(T enumValue) Implements abstract com. Doc from com. Returns a representation of | |
| doForward | back to summary |
|---|---|
| protected T doForward(String value) Implements abstract com. Doc from com. Returns a representation of | |
| equals | back to summary |
|---|---|
| public boolean equals(Object object) Overrides com. Implements com. Doc from com. Indicates whether another object is equal to this converter. Most implementations will have no reason to override the behavior of
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |