public class

ShortCodedLabeledEnum

extends AbstractGenericLabeledEnum
java.lang.Object
   ↳ org.springframework.core.enums.AbstractLabeledEnum
     ↳ org.springframework.core.enums.AbstractGenericLabeledEnum
       ↳ org.springframework.core.enums.ShortCodedLabeledEnum

This class is deprecated.
as of Spring 3.0, in favor of Java 5 enums.

Class Overview

Implementation of LabeledEnum which uses Short as the code type.

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.

Summary

[Expand]
Inherited Fields
From interface org.springframework.core.enums.LabeledEnum
Public Constructors
ShortCodedLabeledEnum(int code, String label)
Create a new ShortCodedLabeledEnum instance.
Public Methods
Comparable getCode()
short getShortCode()
Return the short code of this LabeledEnum instance.
[Expand]
Inherited Methods
From class org.springframework.core.enums.AbstractGenericLabeledEnum
From class org.springframework.core.enums.AbstractLabeledEnum
From class java.lang.Object
From interface java.lang.Comparable
From interface org.springframework.core.enums.LabeledEnum

Public Constructors

public ShortCodedLabeledEnum (int code, String label)

Also: SpringCore

Create a new ShortCodedLabeledEnum instance.

Parameters
code the short code
label the label (can be null)

Public Methods

public Comparable getCode ()

Also: SpringCore

public short getShortCode ()

Also: SpringCore

Return the short code of this LabeledEnum instance.