Package com.jeff_media.jefflib.data
Class EnumCache<E extends Enum<E>>
java.lang.Object
com.jeff_media.jefflib.data.EnumCache<E>
- Type Parameters:
E
- The enum type
- All Implemented Interfaces:
Iterable<E>
A simple
Enum
cache that caches the enum constants and size of the enum-
Method Summary
-
Method Details
-
of
Creates a new or returns the cachedEnumCache
for the given enum class- Type Parameters:
E
- The enum type- Parameters:
enumClass
- The enum class- Returns:
- The
EnumCache
for the given enum class
-
iterator
-
spliterator
- Specified by:
spliterator
in interfaceIterable<E extends Enum<E>>
-
getEnumClass
-
getEnumConstants
Returns an unmodifiable list of the enum constants- Returns:
- An unmodifiable list of the enum constants
-
getSize
Returns the size of the enum- Returns:
- The size of the enum
-