public class GroupComparator extends Object implements Comparator<Group>
Modifier and Type | Field and Description |
---|---|
static Comparator<Group> |
GROUP_COMPARATOR |
Modifier and Type | Method and Description |
---|---|
int |
compare(Group group1,
Group group2) |
static int |
compareTo(Group group1,
Group group2) |
static boolean |
equal(Group group1,
Group group2)
Checks whether the two Group objects are equal according to the contract of the
Group interface. |
static boolean |
equalsObject(Group group,
Object o) |
static int |
hashCode(Group group) |
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 static final Comparator<Group> GROUP_COMPARATOR
public int compare(Group group1, Group group2)
compare
in interface Comparator<Group>
public static boolean equal(Group group1, Group group2)
Group
interface.
If you are implementing Group.equals(Object)
then just write code like this:
public boolean equals(Object o) { return (o instanceof Group) && GroupComparator.equal(this, (Group) o); }
group1
- First Groupgroup2
- Second Grouppublic static int hashCode(Group group)
Copyright © 2020 Atlassian. All rights reserved.