Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.springframework.core.enums
Interface LabeledEnum

All Superinterfaces:
  java.lang.Comparable, java.io.Serializable

All Known Implementing Classes:
  AbstractGenericLabeledEnum, AbstractLabeledEnum, LetterCodedLabeledEnum, ShortCodedLabeledEnum, StaticLabeledEnum, StringCodedLabeledEnum

Deprecated. as of Spring 3.0, in favor of Java 5 enums.

    @Deprecated
    public interface LabeledEnum

extends java.lang.Comparable, java.io.Serializable

An interface for objects that represent a labeled enumeration. Each such enum instance has the following characteristics:

- A type that identifies the enum's class. For example: `com.mycompany.util.FileFormat`.
- A code that uniquely identifies the enum within the context of its type. For example: "CSV". Different classes of codes are possible (e.g., Character, Integer, String).
- A descriptive label. For example: "the CSV File Format".

Since:
  1.2.2
Author:
  Keith Donald

Field Summary
`static java.util.Comparator` | `CODE_ORDER` Deprecated. Shared Comparator instance that sorts enumerations by `CODE_ORDER`.
`static java.util.Comparator` | `DEFAULT_ORDER` Deprecated. Shared Comparator instance that sorts enumerations by `LABEL_ORDER`, then `CODE_ORDER`.
`static java.util.Comparator` | `LABEL_ORDER` Deprecated. Shared Comparator instance that sorts enumerations by `LABEL_ORDER`.

Method Summary
`java.lang.Comparable` | `getCode()` Deprecated. Return this enumeration's code.
`java.lang.String` | `getLabel()` Deprecated. Return a descriptive, optional label.
`java.lang.Class` | `getType()` Deprecated. Return this enumeration's type.

Methods inherited from interface java.lang.Comparable
`compareTo`

Field Detail

### CODE_ORDER

    static final java.util.Comparator CODE_ORDER

  Deprecated.
  Shared Comparator instance that sorts enumerations by `CODE_ORDER`.

### LABEL_ORDER

    static final java.util.Comparator LABEL_ORDER

  Deprecated.
  Shared Comparator instance that sorts enumerations by `LABEL_ORDER`.

### DEFAULT_ORDER

    static final java.util.Comparator DEFAULT_ORDER

  Deprecated.
  Shared Comparator instance that sorts enumerations by `LABEL_ORDER`, then `CODE_ORDER`.

Method Detail

### getType

    java.lang.Class getType()

  Deprecated.
  Return this enumeration's type.

### getCode

    java.lang.Comparable getCode()

  Deprecated.
  Return this enumeration's code.

  Each code should be unique within enumerations of the same type.

### getLabel

    java.lang.String getLabel()

  Deprecated.
  Return a descriptive, optional label.

Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD