|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.core.enums.AbstractLabeledEnum org.springframework.core.enums.AbstractGenericLabeledEnum org.springframework.core.enums.StringCodedLabeledEnum
public class StringCodedLabeledEnum
Implementation of LabeledEnum which uses a String 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
Each code should be unique within enumerations of the same type.
LabeledEnumResolver.getLabeledEnumSet(type) in this case.
LabeledEnumResolver.getLabeledEnumSet(Class)
,
Serialized Form
Field Summary
Fields inherited from interface org.springframework.core.enums.LabeledEnum
CODE_ORDER, DEFAULT_ORDER, LABEL_ORDER
Constructor Summary
StringCodedLabeledEnum(String code,
String label)
Create a new StringCodedLabeledEnum instance.
Method Summary
Comparable
getCode()
Return this enumeration's code.
String
getStringCode()
Return the String 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
StringCodedLabeledEnum
public StringCodedLabeledEnum(String code,
String label)
code
- the String codelabel
- the label (can be null
)
Method Detail
getCode
public Comparable getCode()
LabeledEnum
getStringCode
public String getStringCode()
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
Copyright © 2002-2008 The Spring Framework.