com.raritantechnologies.utils.comparators
Class IntegerEqualsComparator

java.lang.Object
  extended bycom.raritantechnologies.utils.comparators.IntegerEqualsComparator
All Implemented Interfaces:
java.util.Comparator, IComparator, IConfigurable
Direct Known Subclasses:
IntegerGreaterThanComparator, IntegerGreaterThanEqualsComparator, IntegerLessThanComparator, IntegerLessThanEqualsComparator

public class IntegerEqualsComparator
extends java.lang.Object
implements IComparator

Configurable java.util.Comparator that performs a integer equals comparison.

XML Configuration Template:
   <Comparator class="com.raritantechnologies.utils.comparators.IntegerEqualsComparator"
                  value="[ the comparison value (an integer) ]" />
 

Developed by Raritan Technologies Inc..

Author:
Ted Sullivan

Field Summary
protected  int limit
           
 
Fields inherited from interface com.raritantechnologies.utils.comparators.IComparator
TEMPLATE
 
Constructor Summary
IntegerEqualsComparator()
           
IntegerEqualsComparator(java.lang.Integer integer)
           
IntegerEqualsComparator(java.lang.String integerStr)
           
 
Method Summary
 int compare(java.lang.Object ob1, java.lang.Object ob2)
           
 int convertToInt(java.lang.String val)
           
 boolean equals(java.lang.Object object)
           
 java.lang.String getConfigurationXML()
           
 java.lang.String getConfigurationXML(java.lang.String configurationTemplate)
           
 void getConfigurationXML(java.io.Writer writer)
           
 int getValue()
           
 void initialize(org.w3c.dom.Element elem)
          Initializes the object from an XML tag or element.
 void setValue(int value)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

limit

protected int limit
Constructor Detail

IntegerEqualsComparator

public IntegerEqualsComparator()

IntegerEqualsComparator

public IntegerEqualsComparator(java.lang.String integerStr)

IntegerEqualsComparator

public IntegerEqualsComparator(java.lang.Integer integer)
Method Detail

equals

public boolean equals(java.lang.Object object)
Specified by:
equals in interface java.util.Comparator

compare

public int compare(java.lang.Object ob1,
                   java.lang.Object ob2)
Specified by:
compare in interface java.util.Comparator

initialize

public void initialize(org.w3c.dom.Element elem)
Description copied from interface: IConfigurable
Initializes the object from an XML tag or element. This method is called by the Framework as part of the application initializtion. see ConfigurationManager, XMLConfigurationManager, XMLSearchFieldMapFactory, XMLSearchSourceFactory. Configurable objects that are owned or contained by other configurable objects will be initialized in by the parent object.

Specified by:
initialize in interface IConfigurable

convertToInt

public int convertToInt(java.lang.String val)

setValue

public void setValue(int value)

getValue

public int getValue()

getConfigurationXML

public void getConfigurationXML(java.io.Writer writer)
                         throws java.io.IOException
Throws:
java.io.IOException

getConfigurationXML

public java.lang.String getConfigurationXML()

getConfigurationXML

public java.lang.String getConfigurationXML(java.lang.String configurationTemplate)