@Deprecated public abstract class StaticLabeledEnum extends AbstractLabeledEnum
public class FlowSessionStatus extends StaticLabeledEnum { // public static final instances! public static FlowSessionStatus CREATED = new FlowSessionStatus(0, "Created"); public static FlowSessionStatus ACTIVE = new FlowSessionStatus(1, "Active"); public static FlowSessionStatus PAUSED = new FlowSessionStatus(2, "Paused"); public static FlowSessionStatus SUSPENDED = new FlowSessionStatus(3, "Suspended"); public static FlowSessionStatus ENDED = new FlowSessionStatus(4, "Ended"); // private constructor! private FlowSessionStatus(int code, String label) { super(code, label); } // custom behavior }
CODE_ORDER, DEFAULT_ORDER, LABEL_ORDER
Modifier | Constructor and Description |
---|---|
protected |
StaticLabeledEnum(int code,
String label)
Deprecated.
Create a new StaticLabeledEnum instance.
|
Modifier and Type | Method and Description |
---|---|
Comparable |
getCode()
Deprecated.
Return this enumeration's code.
|
String |
getLabel()
Deprecated.
Return a descriptive, optional label.
|
protected Object |
readResolve()
Deprecated.
Return the resolved type safe static enum instance.
|
short |
shortValue()
Deprecated.
Return the code of this LabeledEnum instance as a short.
|
protected StaticLabeledEnum(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 String getLabel()
LabeledEnum
public short shortValue()
protected Object readResolve()
Copyright © 2015. All rights reserved.