org.apache.xpath.objects
Class Comparator

java.lang.Object
  extended byorg.apache.xpath.objects.Comparator
Direct Known Subclasses:
EqualComparator, GreaterThanComparator, GreaterThanOrEqualComparator, LessThanComparator, LessThanOrEqualComparator, NotEqualComparator

abstract class Comparator
extends Object

compares nodes for various boolean operations.


Constructor Summary
(package private) Comparator()
           
 
Method Summary
(package private) abstract  boolean compareNumbers(double n1, double n2)
          Compare two numbers
(package private) abstract  boolean compareStrings(XMLString s1, XMLString s2)
          Compare two strings
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Comparator

Comparator()
Method Detail

compareStrings

abstract boolean compareStrings(XMLString s1,
                                XMLString s2)
Compare two strings

Parameters:
s1 - First string to compare
s2 - Second String to compare
Returns:
Whether the strings are equal or not

compareNumbers

abstract boolean compareNumbers(double n1,
                                double n2)
Compare two numbers

Parameters:
n1 - First number to compare
n2 - Second number to compare
Returns:
Whether the numbers are equal or not