Class ImmutableGroup

java.lang.Object
com.atlassian.crowd.embedded.impl.ImmutableGroup
All Implemented Interfaces:
Group, Serializable, Comparable<Group>

public class ImmutableGroup extends Object implements Group, Serializable
A general purpose immutable implementation of the Group interface.

Note: This object does not allow null name.

See Also:
  • Constructor Details

    • ImmutableGroup

      public ImmutableGroup(@Nonnull String name)
  • Method Details

    • getName

      public String getName()
      Specified by:
      getName in interface Group
      Returns:
      name of the group.
    • compareTo

      public int compareTo(Group other)
      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:
      other - 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.