java.lang.Object | ||
↳ | org.springframework.core.enums.AbstractLabeledEnum | |
↳ | org.springframework.core.enums.StaticLabeledEnum |
This class is deprecated.
as of Spring 3.0, in favor of Java 5 enums.
Base class for static type-safe labeled enum instances. Usage example:
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 }
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
org.springframework.core.enums.LabeledEnum
|
Protected Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Create a new StaticLabeledEnum instance.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Return the code of this LabeledEnum instance as a short.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Return the resolved type safe static enum instance.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.springframework.core.enums.AbstractLabeledEnum
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
java.lang.Comparable
| |||||||||||
From interface
org.springframework.core.enums.LabeledEnum
|
Create a new StaticLabeledEnum instance.
code | the short code |
---|---|
label | the label (can be null )
|
Return the code of this LabeledEnum instance as a short.
Return the resolved type safe static enum instance.