Class ArbitraryComparator
java.lang.Object
org.deltava.comparators.ArbitraryComparator
- All Implemented Interfaces:
Comparator<DatabaseBean>
A Comparator to order database beans in an arbitrary order, based on a pre-set
list of IDs. Database beans with IDs not in the list will be added at the end of
the Collection.
- Since:
- 2.1
- Version:
- 8.0
- Author:
- Luke
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Comparator
equals, max, min, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
ArbitraryComparator
Initializes the comparator.- Parameters:
IDs- a Collection of database IDs in the proper order.
-
-
Method Details
-
compare
- Specified by:
comparein interfaceComparator<DatabaseBean>
-