public class NameableComparator<T extends Nameable>
extends java.lang.Object
implements java.util.Comparator<T>, java.io.Serializable
Comparator
interface which uses
the name of Nameable
items to compare the objects. If the names
are equal it uses the ID:s to really check if they are equal.
Note: this comparator is consistent with equals.
Modifier and Type | Field and Description |
---|---|
private boolean |
descending |
private static long |
serialVersionUID |
Constructor and Description |
---|
NameableComparator(boolean descending)
Create a new comparator.
|
private static final long serialVersionUID
private final boolean descending