intarsys runtime library

de.intarsys.tools.enumeration
Class EnumItem

java.lang.Object
  extended by 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");
 


Method Summary
 int compareTo(Object o)
           
 String getDescription()
           
 String getIconName()
           
 String getId()
           
 String getLabel()
           
 String getLocalizedLabel()
           
 Message getMessage()
           
 String getTip()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

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

intarsys runtime library

Copyright © 2008 intarsys consulting GmbH. All Rights Reserved.