Package net.morimekta.providence
Interface PEnumValue<T>
-
- All Superinterfaces:
java.lang.Comparable<T>
,net.morimekta.util.Numeric
,PValue<T>
,net.morimekta.util.Stringable
- All Known Implementing Classes:
PApplicationExceptionType
,PServiceCallType
public interface PEnumValue<T> extends PValue<T>, net.morimekta.util.Stringable, net.morimekta.util.Numeric
Base interface for enum values.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description PEnumDescriptor
descriptor()
default int
getId()
Deprecated.since 1.10.0 UseNumeric.asInteger()
instead.default java.lang.String
getName()
Deprecated.since 1.10.0 UseNumeric.asInteger()
instead.default int
getValue()
Deprecated.since 0.5.0 UseNumeric.asInteger()
orgetId()
instead.
-
-
-
Method Detail
-
getId
@Deprecated default int getId()
Deprecated.since 1.10.0 UseNumeric.asInteger()
instead. Will be removed in a future version, but kept for now as it is too widely used to be removed immediately.Method for getting the ID of the value that is a bit more accurate when reading code thanNumeric.asInteger()
- Returns:
- The ID value for the enum.
-
getName
@Deprecated @Nonnull default java.lang.String getName()
Deprecated.since 1.10.0 UseNumeric.asInteger()
instead. Will be removed in a future version, but kept for now as it is too widely used to be removed immediately.Method for getting the name of the value that is a bit more accurate when reading code thanStringable.asString()
- Returns:
- The name of the enum value.
-
getValue
@Deprecated default int getValue()
Deprecated.since 0.5.0 UseNumeric.asInteger()
orgetId()
instead. Will be removed in a future version, but kept for now as it is too widely used to be removed immediately.- Returns:
- The numeric value for the enum.
-
descriptor
@Nonnull PEnumDescriptor descriptor()
- Specified by:
descriptor
in interfacePValue<T>
-
-