Java org.apache.commons.collections.comparators ComparatorChain fields, constructors, methods, implement or subclass

Example usage for Java org.apache.commons.collections.comparators ComparatorChain fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.apache.commons.collections.comparators ComparatorChain.

The text is from its open source code.

Subclass

org.apache.commons.collections.comparators.ComparatorChain has subclasses.
Click this link to see all its subclasses.

Constructor

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.

Method

voidaddComparator(Comparator comparator)
Add a Comparator to the end of the chain using the forward sort order
voidaddComparator(Comparator comparator, boolean reverse)
Add a Comparator to the end of the chain using the given sort order
intcompare(Object o1, Object o2)
Perform comparisons on the Objects as per Comparator.compare(o1,o2).
voidsetReverseSort(int index)
Change the sort order at the given index in the ComparatorChain to a reverse sort.
intsize()
Number of Comparators in the current ComparatorChain.