AbstractGroup (Apache Tomcat 11.0.21 API Documentation)
Description: declaration: package: org.apache.catalina.users, class: AbstractGroup

# Class AbstractGroup

java.lang.Object
org.apache.catalina.users.AbstractGroup

All Implemented Interfaces:
  `Principal, Group`

Direct Known Subclasses:
  `GenericGroup`

public abstract class AbstractGroup extends Object implements Group

Convenience base class for `Group` implementations.

Since:
  4.1

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected String`
  `description`
  The description of this group.
  `protected String`
  `groupname`
  The group name of this group.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AbstractGroup()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getDescription()`
  `String`
  `getGroupname()`
  `String`
  `getName()`
  Make the principal name the same as the group name.
  `void`
  `setDescription(String description)`
  Set the description of this group.
  `void`
  `setGroupname(String groupname)`
  Set the group name of this group, which must be unique within the scope of a `UserDatabase`.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface Group

  `addRole, getRoles, getUserDatabase, getUsers, isInRole, removeRole, removeRoles`

  ### Methods inherited from interface Principal

  `equals, hashCode, implies, toString`

- ## Field Details

  - ### description

    protected String description
    The description of this group.

  - ### groupname

    protected String groupname
    The group name of this group.

- ## Constructor Details

  - ### AbstractGroup

    public AbstractGroup()

- ## Method Details

  - ### getDescription

    public String getDescription()
    Specified by:
      `getDescription` in interface `Group`
    Returns:
      the description of this group.

  - ### setDescription

    public void setDescription(String description)
    Description copied from interface: `Group`
    Set the description of this group.
    Specified by:
      `setDescription` in interface `Group`
    Parameters:
      `description` - The new description

  - ### getGroupname

    public String getGroupname()
    Specified by:
      `getGroupname` in interface `Group`
    Returns:
      the group name of this group, which must be unique within the scope of a `UserDatabase`.

  - ### setGroupname

    public void setGroupname(String groupname)
    Description copied from interface: `Group`
    Set the group name of this group, which must be unique within the scope of a `UserDatabase`.
    Specified by:
      `setGroupname` in interface `Group`
    Parameters:
      `groupname` - The new group name

  - ### getName

    public String getName()
    Make the principal name the same as the group name.
    Specified by:
      `getName` in interface `Principal`