net.ontopia.utils
Class StringifierComparator

java.lang.Object
  extended by net.ontopia.utils.StringifierComparator
All Implemented Interfaces:
java.util.Comparator

public class StringifierComparator
extends java.lang.Object
implements java.util.Comparator

INTERNAL: Comparator that stringifies the arguments and compares them using another comparator. DefaultStringifier is the default stringifier.


Field Summary
protected  java.util.Comparator comparator
           
protected  StringifierIF stringifier
           
 
Constructor Summary
StringifierComparator()
           
StringifierComparator(StringifierIF stringifier)
           
StringifierComparator(StringifierIF stringifier, java.util.Comparator comparator)
           
 
Method Summary
 int compare(java.lang.Object obj1, java.lang.Object obj2)
           
 java.util.Comparator getComparator()
          Gets the comparator which is to be used.
 void setComparator(java.util.Comparator comparator)
          Sets the comparator which is to be used.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Field Detail

comparator

protected java.util.Comparator comparator

stringifier

protected StringifierIF stringifier
Constructor Detail

StringifierComparator

public StringifierComparator()

StringifierComparator

public StringifierComparator(StringifierIF stringifier)

StringifierComparator

public StringifierComparator(StringifierIF stringifier,
                             java.util.Comparator comparator)
Method Detail

getComparator

public java.util.Comparator getComparator()
Gets the comparator which is to be used.


setComparator

public void setComparator(java.util.Comparator comparator)
Sets the comparator which is to be used.


compare

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


Copyright © 2000-2012 Ontopia.