public class PersonByNameComparator extends Object implements Comparator<Person>, Serializable
Constructor and Description |
---|
PersonByNameComparator() |
Modifier and Type | Method and Description |
---|---|
int |
compare(Person person1,
Person person2) |
static int |
comparePersonsByName(Person person1,
Person person2)
Compares two person objects by name
Should return negative if personName for person1 comes before that of person2
Should return positive if personName for person1 comes after that of person2
Should return zero if the givenName middleName and familyName match
Should be case insensitive
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public int compare(Person person1, Person person2)
compare
in interface Comparator<Person>
Comparator.compare(java.lang.Object, java.lang.Object)
public static int comparePersonsByName(Person person1, Person person2)
Copyright © 2024 OpenMRS Inc.. All rights reserved.