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:
java.util.Comparator<T>
public class CaddyComparator<T extends Data> extends java.lang.Object implements java.util.Comparator<T>
Compares Data based on their presence in the Caddy.- Since:
- jcms-5.7
-
-
Constructor Summary
Constructors Constructor Description CaddyComparator()
Constructs a new CaddyComparator usingBasicStorable.MdateComparator
as default comparator.CaddyComparator(java.util.Comparator<T> comparator)
Contructs a new CaddyComparator using the specified comparator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(T data1, T data2)
-
-
-
Constructor Detail
-
CaddyComparator
public CaddyComparator()
Constructs a new CaddyComparator usingBasicStorable.MdateComparator
as default comparator.
-
CaddyComparator
public CaddyComparator(java.util.Comparator<T> comparator)
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:
java.lang.IllegalArgumentException
- when specified comparator is null.
-
-