public static class SimpleStar.StarComparator extends Object implements Comparator<Star>
| Modifier and Type | Field and Description |
|---|---|
(package private) int |
ascending |
(package private) String |
field |
| Constructor and Description |
|---|
StarComparator(String id)
We compare the star for the field given.
|
StarComparator(String id,
boolean asc)
We compare the star for the field given.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compare(Star o1,
Star o2)
Two stars are compared for their property named by the constructor
field.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcomparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongString field
int ascending
public StarComparator(String id)
public StarComparator(String id, boolean asc)