public final class EnumCodec
extends Object
-
Nested Class Summary
Nested Classes
static final record
static final record
-
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Method Details
-
byName
- Type Parameters:
E - a type of the Enum
- Parameters:
enumClass - the class of EnumCodec
- Returns:
- a new
Codec of the specified Enum class
-
byOrdinal
public static <E extends Enum<E>> Codec<E> byOrdinal(Class<E> enumClass)
- Type Parameters:
E - a type of the Enum
- Parameters:
enumClass - the class of EnumCodec
- Returns:
- a new
Codec of the specified Enum class