public class NameableComparator<T extends Nameable> extends Object implements Comparator<T>, 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