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".
  • Constructor Details

    • DelegatingGroupWithAttributes

      public DelegatingGroupWithAttributes(Group group, Attributes attributes)
  • Method Details

    • 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 Comparable<Group>
      Specified by:
      compareTo in interface 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.