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, wait
comparing, comparing, comparingDouble, comparingInt, comparingLong, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public int compare(Person person1, Person person2) throws ClassCastException, NullPointerException
compare
in interface Comparator<Person>
o1
- o2
- ClassCastException
NullPointerException
public boolean equals(Object obj)
equals
in interface Comparator<Person>
equals
in class Object
obj
- ClassCastException
Copyright © 2018. All Rights Reserved.