Java2ComparatorAdapter (java.util.Comparator comparator)
Construct a Java2Comparator which delegates the Comparator.compare(Object,Object)
method to an object that implements
comparator
protected java.util.Comparator comparator
Java2ComparatorAdapter
public Java2ComparatorAdapter ()
A default constructor. You must use setComparator(java.util.Comparator)
before using this comparator.
Java2ComparatorAdapter
public Java2ComparatorAdapter (java.util.Comparator comparator)
Construct a Java2Comparator which delegates the Comparator.compare(Object,Object)
method to an object that implements Comparator
Parameters: comparator
- a comparison object
compare
public int compare (java.lang.Object a,
java.lang.Object b)
Specified by: compare
in interface java.util.Comparator
setComparator
public void setComparator (java.util.Comparator comparator)
Set the comparator.
Parameters: comparator
- the new comparator.
getComparator
public java.util.Comparator getComparator ()
Return the current comparator.
Returns: the current comparator.
Copyright © 2009 SAS Institute Inc. All Rights Reserved.