private static class Frequency.NaturalComparator<T extends Comparable<T>> extends Object implements Comparator<Comparable<T>>, Serializable
| Modifier and Type | Field and Description |
|---|---|
private static long |
serialVersionUID
Serializable version identifier
|
| Modifier | Constructor and Description |
|---|---|
private |
Frequency.NaturalComparator() |
| Modifier and Type | Method and Description |
|---|---|
int |
compare(Comparable<T> o1,
Comparable<T> o2)
Compare the two
Comparable arguments. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitequalsprivate static final long serialVersionUID
public int compare(Comparable<T> o1, Comparable<T> o2)
Comparable arguments.
This method is equivalent to:
((Comparable)o1).compareTo(o2)
compare in interface Comparator<Comparable<T extends Comparable<T>>>o1 - the first objecto2 - the second objectNullPointerException - when o1 is null,
or when ((Comparable)o1).compareTo(o2) doesClassCastException - when o1 is not a Comparable,
or when ((Comparable)o1).compareTo(o2) doesCopyright (c) 2003-2014 Apache Software Foundation