com.atlassian.crowd.embedded.api
Class GroupComparator

java.lang.Object
  extended by com.atlassian.crowd.embedded.api.GroupComparator
All Implemented Interfaces:
java.util.Comparator<Group>

public class GroupComparator
extends java.lang.Object
implements java.util.Comparator<Group>


Field Summary
static java.util.Comparator<Group> GROUP_COMPARATOR
           
 
Method Summary
 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, java.lang.Object o)
           
static int hashCode(Group group)
           
 
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
 

Field Detail

GROUP_COMPARATOR

public static final java.util.Comparator<Group> GROUP_COMPARATOR
Method Detail

compare

public int compare(Group group1,
                   Group group2)
Specified by:
compare in interface java.util.Comparator<Group>

equal

public static boolean equal(Group group1,
                            Group group2)
Checks whether the two Group objects are equal according to the contract of the 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);
    }
 

Parameters:
group1 - First Group
group2 - Second Group
Returns:
true if these are two equal Groups.

equalsObject

public static boolean equalsObject(Group group,
                                   java.lang.Object o)

hashCode

public static int hashCode(Group group)

compareTo

public static int compareTo(Group group1,
                            Group group2)


Copyright © 2010 Atlassian. All Rights Reserved.