org.apache.cocoon.util
Class EnumerationFactory

java.lang.Object
  extended byorg.apache.cocoon.util.EnumerationFactory

public class EnumerationFactory
extends Object

A factory for the creation of enumeration types (missing in Java). The same operations are provided as for Ada, only representation specification is missing (which does not seem to make much sense in Java). Enumeration classes are to be derived from this class thereby making the constructors private to inhibit creation outside of the derived class.

Version:
$Id: EnumerationFactory.html 1304280 2012-03-23 11:18:01Z ilgrosso $

Constructor Summary
EnumerationFactory()
           
EnumerationFactory(String image)
          Constructors with and without a string representation (image).
 
Method Summary
 boolean ge(EnumerationFactory e)
           
static EnumerationFactory getFirst()
           
static EnumerationFactory getLast()
           
 EnumerationFactory getNext()
           
static EnumerationFactory getObject(String image)
           
 int getPos()
           
 EnumerationFactory getPrev()
           
static EnumerationFactory getVal(int value)
          Access to the numeric representation.
 boolean gt(EnumerationFactory e)
           
 boolean le(EnumerationFactory e)
           
 boolean lt(EnumerationFactory e)
          Order relations Object.op (OtherObject) representing the relation Object op OtherObject.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EnumerationFactory

public EnumerationFactory(String image)
Constructors with and without a string representation (image). Make constructors private upon derivation. Be careful: No check is made that the image string is unique!

Parameters:
image -

EnumerationFactory

public EnumerationFactory()
Method Detail

lt

public boolean lt(EnumerationFactory e)
Order relations Object.op (OtherObject) representing the relation Object op OtherObject.

Parameters:
e - the right operand

le

public boolean le(EnumerationFactory e)

gt

public boolean gt(EnumerationFactory e)

ge

public boolean ge(EnumerationFactory e)

getPos

public int getPos()

getVal

public static EnumerationFactory getVal(int value)
Access to the numeric representation.

Parameters:
value - the numeric value

getFirst

public static EnumerationFactory getFirst()

getLast

public static EnumerationFactory getLast()

getNext

public EnumerationFactory getNext()

getPrev

public EnumerationFactory getPrev()

toString

public String toString()

getObject

public static EnumerationFactory getObject(String image)


Copyright © 1999-2008 The Apache Software Foundation. All Rights Reserved.