Package tech.mappie.api
Class EnumMappingConstructor
-
- All Implemented Interfaces:
public final class EnumMappingConstructor<FROM extends Object, TO extends Object>
-
-
Constructor Summary
Constructors Constructor Description EnumMappingConstructor()
-
Method Summary
-
-
Method Detail
-
fromEnumEntry
final Unit fromEnumEntry(TO $self, FROM source)
Explicitly construct a mapping to TO from source entry source.
For example
Colour.UNKNOWN fromEnumEntry Color.ORANGEwill generate an explicit mapping, mapping
Colour.ORANGEtoColor.UNKNOWN.
-
thrownByEnumEntry
final Unit thrownByEnumEntry(Throwable $self, FROM source)
Explicitly construct a mapping to throw an exception from source entry source.
For example
IllegalStateException() fromEnumEntry Color.ORANGEwill generate an explicit mapping, mapping
Colour.ORANGEto an IllegalStateException being thrown.
-
-
-
-