Class CollectionComparator<T,C extends Collection<? extends T>>
- java.lang.Object
-
- com.g2forge.alexandria.java.adt.compare.CollectionComparator<T,C>
-
- All Implemented Interfaces:
Comparator<C>
public class CollectionComparator<T,C extends Collection<? extends T>> extends Object implements Comparator<C>
-
-
Field Summary
Fields Modifier and Type Field Description protected Comparator<? super T>
elementComparator
-
Constructor Summary
Constructors Constructor Description CollectionComparator(Comparator<? super T> elementComparator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(C c1, C c2)
protected Comparator<? super T>
getElementComparator()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
Field Detail
-
elementComparator
protected final Comparator<? super T> elementComparator
-
-
Constructor Detail
-
CollectionComparator
@ConstructorProperties("elementComparator") public CollectionComparator(Comparator<? super T> elementComparator)
-
-
Method Detail
-
compare
public int compare(C c1, C c2)
- Specified by:
compare
in interfaceComparator<T>
-
getElementComparator
protected Comparator<? super T> getElementComparator()
-
-