public class PersonFamilyNameComparator extends Object implements Comparator<Person>
| Constructor and Description |
|---|
PersonFamilyNameComparator() |
| Modifier and Type | Method and Description |
|---|---|
int |
compare(Person person1,
Person person2)
Compares order based on the String familyNames of two Person object.
|
boolean |
equals(Object obj)
Indicates whether some other object is "equal to" this comparator.
|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcomparing, comparing, comparingDouble, comparingInt, comparingLong, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongpublic int compare(Person person1, Person person2) throws ClassCastException, NullPointerException
compare in interface Comparator<Person>o1 - o2 - ClassCastExceptionNullPointerExceptionpublic boolean equals(Object obj)
equals in interface Comparator<Person>equals in class Objectobj - ClassCastExceptionCopyright © 2018. All Rights Reserved.