Package com.atlassian.crowd.embedded.api
Class GroupComparator
java.lang.Object
com.atlassian.crowd.embedded.api.GroupComparator
- All Implemented Interfaces:
Comparator<Group>
Comparator for a Group.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
static int
static boolean
Checks whether the two Group objects are equal according to the contract of theGroup
interface.static boolean
equalsObject
(Group group, Object o) static int
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Field Details
-
GROUP_COMPARATOR
-
-
Method Details
-
compare
- Specified by:
compare
in interfaceComparator<Group>
-
equal
Checks whether the two Group objects are equal according to the contract of theGroup
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); }
- Parameters:
group1
- First Groupgroup2
- Second Group- Returns:
- true if these are two equal Groups.
-
equalsObject
-
hashCode
-
compareTo
-