Example usage for Java org.apache.commons.collections.comparators ComparatorChain fields, constructors, methods, implement or subclass
The text is from its open source code.
ComparatorChain() Construct a ComparatorChain with no Comparators. | |
ComparatorChain(Comparator comparator) Construct a ComparatorChain with a single Comparator, sorting in the forward order | |
ComparatorChain(List list) Construct a ComparatorChain from the Comparators in the List. | |
ComparatorChain(Comparator comparator, boolean reverse) Construct a Comparator chain with a single Comparator, sorting in the given order | |
ComparatorChain(List list, BitSet bits) Construct a ComparatorChain from the Comparators in the given List. |
void | addComparator(Comparator comparator) Add a Comparator to the end of the chain using the forward sort order |
void | addComparator(Comparator comparator, boolean reverse) Add a Comparator to the end of the chain using the given sort order |
int | compare(Object o1, Object o2) Perform comparisons on the Objects as per Comparator.compare(o1,o2). |
void | setReverseSort(int index) Change the sort order at the given index in the ComparatorChain to a reverse sort. |
int | size() Number of Comparators in the current ComparatorChain. |