public class GroupComparator extends Object implements Comparator<Group>
Group
in order to be compatible.
You can also instantiate this class to get a Comparator of Group.
Note: the GroupComparator is distinct from the EmbeddedGroupComparator as
model groups take the directoryId into consideration when performing equals/hashCode/compareTo.Modifier and Type | Field and Description |
---|---|
static Comparator<Group> |
GROUP_COMPARATOR
Singleton instance of Comparator<Group>
|
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 static boolean equal(Group group1, Group group2)
Group
interface.
If you are implementing DirectoryEntity.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)
public int compare(Group group1, Group group2)
compare
in interface Comparator<Group>
Copyright © 2021 Atlassian. All rights reserved.
View cookie preferences