站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Spring Framework 2.0.5 API 文档英文版

LetterCodedLabeledEnum (Spring Framework API 2.0) - Spring Framework 2.0.5 API 文档英文版

The Spring Framework

org.springframework.core.enums
Class LetterCodedLabeledEnum

java.lang.Object
  extended by org.springframework.core.enums.AbstractLabeledEnum
      extended by org.springframework.core.enums.AbstractGenericLabeledEnum
          extended by org.springframework.core.enums.LetterCodedLabeledEnum
All Implemented Interfaces:
Serializable, Comparable, LabeledEnum

public class LetterCodedLabeledEnum
extends AbstractGenericLabeledEnum

Implementation of LabeledEnum which uses a letter 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.

Since:
1.2.2
Author:
Keith Donald
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.springframework.core.enums.LabeledEnum
CODE_ORDER, DEFAULT_ORDER, LABEL_ORDER
 
Constructor Summary
LetterCodedLabeledEnum(char code, String label)
          Create a new LetterCodedLabeledEnum instance.
 
Method Summary
 Comparable getCode()
          Return this enumeration's code.
 char getLetterCode()
          Return the letter code of this LabeledEnum instance.
 
Methods inherited from class org.springframework.core.enums.AbstractGenericLabeledEnum
getLabel
 
Methods inherited from class org.springframework.core.enums.AbstractLabeledEnum
compareTo, equals, getType, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LetterCodedLabeledEnum

public LetterCodedLabeledEnum(char code,
                              String label)
Create a new LetterCodedLabeledEnum instance.

Parameters:
code - the letter code
label - the label (can be null)
Method Detail

getCode

public Comparable getCode()
Description copied from interface: LabeledEnum
Return this enumeration's code.

Each code should be unique within enumeration's of the same type.

Specified by:
getCode in interface LabeledEnum
Specified by:
getCode in class AbstractLabeledEnum

getLetterCode

public char getLetterCode()
Return the letter code of this LabeledEnum instance.


The Spring Framework

Copyright © 2002-2007 The Spring Framework.