Package com.jalios.jcms.caddy
Class CaddyComparator<T extends Data>
java.lang.Object
com.jalios.jcms.caddy.CaddyComparator<T>
- Type Parameters:
T- subclass of Data
- All Implemented Interfaces:
Comparator<T>
Compares Data based on their presence in the Caddy.
- Since:
- jcms-5.7
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new CaddyComparator usingBasicStorable.MdateComparatoras default comparator.CaddyComparator(Comparator<T> comparator) Contructs a new CaddyComparator using the specified comparator. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
CaddyComparator
public CaddyComparator()Constructs a new CaddyComparator usingBasicStorable.MdateComparatoras default comparator. -
CaddyComparator
Contructs a new CaddyComparator using the specified comparator.- Parameters:
comparator- the Comparator to use when Data are either both in caddy or else both not in caddy, also if object could not be compared (for example when no Caddy could be retrieved or if object are not instance of Data).- Throws:
IllegalArgumentException- when specified comparator is null.
-
-
Method Details
-
compare
- Specified by:
comparein interfaceComparator<T extends Data>
-