com.raritantechnologies.utils.comparators
Class IntegerRangeComparator
java.lang.Object
com.raritantechnologies.utils.comparators.IntegerRangeComparator
- All Implemented Interfaces:
- java.util.Comparator, IComparator, IConfigurable
- public class IntegerRangeComparator
- extends java.lang.Object
- implements IComparator
Configurable java.util.Comparator that performs a integer within a range.
XML Configuration Template:
<Comparator class="com.raritantechnologies.utils.comparators.IntegerRangeComparator"
lowerLimit="[ lower limit ]"
lowerComparison="[ GT | GTE(default) ]"
upperLimit="[ upper limit ]"
upperComparison="[ LT | LTE(default) ]" />
Developed by
Raritan Technologies Inc..
- Author:
- Ted Sullivan
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IntegerRangeComparator
public IntegerRangeComparator()
IntegerRangeComparator
public IntegerRangeComparator(java.lang.String lowerStr,
java.lang.String upperStr)
IntegerRangeComparator
public IntegerRangeComparator(java.lang.Integer lower,
java.lang.Integer upper)
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)
setLowerComparison
public void setLowerComparison(java.lang.String lowerComp)
setUpperComparison
public void setUpperComparison(java.lang.String upperComp)
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)