deegree 2.3 (2010/04/09 10:10 build-4-official)

org.deegree.model.coverage
Class CodeList

java.lang.Object
  extended by org.deegree.model.coverage.CodeList
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ColorInterpretation, PaletteInterpretation, SampleDimensionType

public abstract class CodeList
extends Object
implements Serializable

Base class for all code lists.

Version:
2.0
Author:
OpenGIS® consortium
See Also:
Serialized Form

Constructor Summary
(package private) CodeList(String name, Collection<CodeList> values)
          Create a new code list instance and add it to the given collection.
protected CodeList(String name, int ordinal)
          Create a new code list instance.
 
Method Summary
abstract  CodeList[] family()
          Returns the list of enumerations of the same kind than this enum.
 String name()
          Returns the name of this enum constant.
 int ordinal()
          Returns the ordinal of this enumeration constant (its position in its enum declaration, where the initial constant is assigned an ordinal of zero).
protected  Object readResolve()
          Resolve the code list to an unique instance after deserialization.
 String toString()
          Returns a string representation of this code list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CodeList

protected CodeList(String name,
                   int ordinal)
Create a new code list instance.

Parameters:
name - The code name.
ordinal - The code value.

CodeList

CodeList(String name,
         Collection<CodeList> values)
Create a new code list instance and add it to the given collection.

Parameters:
name - The code name.
values - The collection to add the enum to.
Method Detail

ordinal

public final int ordinal()
Returns the ordinal of this enumeration constant (its position in its enum declaration, where the initial constant is assigned an ordinal of zero).

Returns:
the ordinal of this enumeration constant.

name

public final String name()
Returns the name of this enum constant.

Returns:
the name of this enum constant.

family

public abstract CodeList[] family()
Returns the list of enumerations of the same kind than this enum.

Returns:
the list of enumerations of the same kind than this enum.

toString

public String toString()
Returns a string representation of this code list.

Overrides:
toString in class Object

readResolve

protected Object readResolve()
                      throws ObjectStreamException
Resolve the code list to an unique instance after deserialization. The instance is resolved using its name only (not its ordinal).

Returns:
This code list as a unique instance.
Throws:
ObjectStreamException - if the deserialization failed.

deegree 2.3 (2010/04/09 10:10 build-4-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org