@Deprecated public class ShortCodedLabeledEnum extends AbstractGenericLabeledEnum
Should almost always be subclassed, but for some simple situations it may be
used directly. Note that you will not be able to use unique type-based functionality
like LabeledEnumResolver.getLabeledEnumSet(type)
in this case.
Modifier and Type | Field and Description |
---|---|
private java.lang.Short |
code
Deprecated.
The unique code of this enum.
|
private static long |
serialVersionUID
Deprecated.
|
CODE_ORDER, DEFAULT_ORDER, LABEL_ORDER
Constructor and Description |
---|
ShortCodedLabeledEnum(int code,
java.lang.String label)
Deprecated.
Create a new ShortCodedLabeledEnum instance.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Comparable |
getCode()
Deprecated.
Return this enumeration's code.
|
short |
getShortCode()
Deprecated.
Return the short code of this LabeledEnum instance.
|
getLabel
private static final long serialVersionUID
private final java.lang.Short code
public ShortCodedLabeledEnum(int code, java.lang.String label)
code
- the short codelabel
- the label (can be null
)public java.lang.Comparable getCode()
LabeledEnum
Each code should be unique within enumerations of the same type.
public short getShortCode()