org.jcreme.filters
Class ComparisonOperator

java.lang.Object
  extended byorg.jcreme.enumerations.Enumeration
      extended byorg.jcreme.filters.ComparisonOperator
All Implemented Interfaces:
java.lang.Comparable, java.io.Serializable
Direct Known Subclasses:
InclusionComparisonOperator, OrderComparisonOperator, StringComparisonOperator

public class ComparisonOperator
extends Enumeration

This enumeration handles the comparison operators that may be used in Filters. This class is subclassed to reflect the specialization of the operators (on Double, Date, ...).

Version:
$Revision: 1.3 $
Author:
$Author: dbregeon $
See Also:
Serialized Form

Field Summary
(package private) static long serialVersionUID
           
 
Constructor Summary
protected ComparisonOperator(java.lang.String name)
          Creates new ComparisonOperator
 
Method Summary
protected  void addAsComparisonOperator(ComparisonOperator cmp)
          This convenience method should be used by subclasses to register their own elements as elements of the ComparisonOperator enumeration.
static ComparisonOperator get(java.lang.String name)
          This method retrieves a ComparisonOperator instance from its name.
static ComparisonOperator[] getComparisonOperators()
          This methods gives the instances of this class.
protected  java.util.Hashtable getFromName()
          This method is for internal use only.
static Enumeration[] getValues()
          This method enables to retrieve all the possible values of an Enumeration class.
 
Methods inherited from class org.jcreme.enumerations.Enumeration
compareTo, getName, readResolve, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

ComparisonOperator

protected ComparisonOperator(java.lang.String name)
                      throws java.security.InvalidParameterException
Creates new ComparisonOperator

Parameters:
name - the name of this enumerated value. It cannot be null.
Throws:
java.security.InvalidParameterException - if nam is null.
Method Detail

addAsComparisonOperator

protected void addAsComparisonOperator(ComparisonOperator cmp)
This convenience method should be used by subclasses to register their own elements as elements of the ComparisonOperator enumeration.

Parameters:
cmp - a ComparisonOperator to put in this Enumeration.

getFromName

protected java.util.Hashtable getFromName()
This method is for internal use only.

Specified by:
getFromName in class Enumeration
Returns:
the Hashtable that links the enumerated values names with the actual enumerated value.

get

public static ComparisonOperator get(java.lang.String name)
This method retrieves a ComparisonOperator instance from its name.

Parameters:
name - the name of the ComparisonOperator instance.
Returns:
the ComparisonOperator that has this name. Null if no value corresponding to this name was found.

getComparisonOperators

public static ComparisonOperator[] getComparisonOperators()
This methods gives the instances of this class.

Returns:
all the instances of this class.

getValues

public static Enumeration[] getValues()
This method enables to retrieve all the possible values of an Enumeration class.

Returns:
the values for this class.


Copyright 2006 null. All Rights Reserved.