E - the type of enum instances this class will manage.
Example usage:
EnumCache<Ecn> ecnEnumCache = EnumCache.of(Ecn.class);
Ecn rfx = ecnEnumCache.get("RFX");
public class StaticEnumClass<E extends Enum<E>> extends EnumCache<E>
EnumCache.
This class is designed to work with traditional Java enum types, enabling efficient
access and operations on the enum instances.
Unlike its counterpart DynamicEnumClass, this class does not support dynamic
creation of enum instances. The enum instances are fixed at compile time as per
standard Java enum behavior.
| Modifier and Type | Method and Description |
|---|---|
E[] |
asArray()
Returns all enum instances in declaration order.
|
<T> Map<E,T> |
createMap()
Creates a map keyed by enum constants.
|
Set<E> |
createSet()
Creates a set for holding enum instances.
|
E |
forIndex(int index)
Retrieves the enum at the specified ordinal.
|
int |
size()
Returns the number of enum constants.
|
E |
valueOf(String name)
Returns the enum instance with the specified name or
null. |
@Nullable public E valueOf(String name)
null.public int size()
public E forIndex(int index)
public E[] asArray()
Copyright © 2026 Chronicle Software Ltd. All rights reserved.