org.obe.util
Interface Enum

All Superinterfaces:
java.lang.Comparable, java.io.Serializable
All Known Implementing Classes:
AbstractEnum

public interface Enum
extends java.lang.Comparable, java.io.Serializable

Represents an enumerated type as described by JDK 1.5. Implementing classes are expected to provide the following methods:

public static final List<EnumType> VALUES;
public static <EnumType> valueOf(String s);
public static <EnumType> valueOf(int i);
public final List<EnumType> family();
public final String compareTo(Object o);
public final String equals(Object o);
public final int hashcode();
public String toString();
protected final Object clone(Object o) throws CloneNotSupportedException
protected final Object readResolve() throws ObjectStreamException;

Author:
Adrian Price

Method Summary
 java.util.List family()
          Returns an immutable list of the members of the enumerated type.
 int value()
          Returns the ordinal value.
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

value

public int value()
Returns the ordinal value.

Returns:
Ordinal value.

family

public java.util.List family()
Returns an immutable list of the members of the enumerated type.

Returns:
The family of allowed values.


SourceForge.net Logo OBE-1.0 Copyright (c) 2002-2006 Adrian Price. All Rights Reserved.