com.atlassian.crowd.embedded.impl
Class DelegatingGroupWithAttributes
java.lang.Object
com.atlassian.crowd.embedded.impl.AbstractDelegatingEntityWithAttributes
com.atlassian.crowd.embedded.impl.DelegatingGroupWithAttributes
- All Implemented Interfaces:
- Attributes, Group, GroupWithAttributes, Comparable<Group>
public class DelegatingGroupWithAttributes
- extends AbstractDelegatingEntityWithAttributes
- implements GroupWithAttributes
Implementation of GroupWithAttributes that simply delegates to an underlying Group and Attributes object.
Instances of this class will be effectively immutable so long as either:
- It is constructed with immutable objects.
or,
- The mutable objects it is constructed with are not "leaked".
Method Summary |
int |
compareTo(Group group)
CompareTo must be compatible with the equals() and hashCode() methods |
boolean |
equals(Object o)
Implementations must ensure equality based on case-insensitive getName(). |
String |
getName()
|
int |
hashCode()
Implementations must produce a hash-code based on case-insensitive getName(). |
DelegatingGroupWithAttributes
public DelegatingGroupWithAttributes(Group group,
Attributes attributes)
getName
public String getName()
- Specified by:
getName
in interface Group
- Returns:
- name of the group.
compareTo
public int compareTo(Group group)
- Description copied from interface:
Group
- CompareTo must be compatible with the equals() and hashCode() methods
- Specified by:
compareTo
in interface Group
- Specified by:
compareTo
in interface Comparable<Group>
- Parameters:
group
- the object to be compared.
- Returns:
- a negative integer, zero, or a positive integer as this object
is less than, equal to, or greater than the specified object.
equals
public boolean equals(Object o)
- Description copied from interface:
Group
- Implementations must ensure equality based on case-insensitive getName().
- Specified by:
equals
in interface Group
- Overrides:
equals
in class Object
- Parameters:
o
- object to compare to.
- Returns:
true
if and only if the names in lowercase
of the directory entities match.
hashCode
public int hashCode()
- Description copied from interface:
Group
- Implementations must produce a hash-code based on case-insensitive getName().
- Specified by:
hashCode
in interface Group
- Overrides:
hashCode
in class Object
- Returns:
- hash-code.
Copyright © 2012 Atlassian. All Rights Reserved.