@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.
CODE_ORDER, DEFAULT_ORDER, LABEL_ORDER
Constructor and Description |
---|
ShortCodedLabeledEnum(int code,
String label)
Deprecated.
Create a new ShortCodedLabeledEnum instance.
|
Modifier and Type | Method and Description |
---|---|
Comparable |
getCode()
Deprecated.
Return this enumeration's code.
|
short |
getShortCode()
Deprecated.
Return the short code of this LabeledEnum instance.
|
getLabel
public ShortCodedLabeledEnum(int code, String label)
code
- the short codelabel
- the label (can be null
)public Comparable getCode()
LabeledEnum
Each code should be unique within enumerations of the same type.
public short getShortCode()