de.intarsys.tools.enumeration
Class EnumItem
java.lang.Object
de.intarsys.tools.enumeration.EnumItem
- All Implemented Interfaces:
- Comparable
public abstract class EnumItem
- extends Object
- implements Comparable
The abstract superclass for an enumeration implementation.
To implement an enumeration class:
- create a subclass of EnumItem
- create a final public static attribute named META to the EnumMeta of the class.
final public static EnumMeta META = getMeta(XYZ.class);
- create a final public static attribute for every member of the enumeration.
public static final XYZ ABC = new XYZ("abxc","My ABC");
compareTo
public int compareTo(Object o)
- Specified by:
compareTo
in interface Comparable
getDescription
public String getDescription()
getIconName
public String getIconName()
getId
public String getId()
getLabel
public String getLabel()
getLocalizedLabel
public String getLocalizedLabel()
getMessage
public Message getMessage()
getTip
public String getTip()
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2008 intarsys consulting GmbH. All Rights Reserved.