Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Methods](https://developer.android.com/reference/java/security/acl/Group#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/java/security/acl/Group#inhmethods)

# Group


`
public


interface
Group
`


`


implements

https://developer.android.com/reference/java/security/Principal


`

|---|
| java.security.acl.Group |

<br />

*** ** * ** ***


**This interface was deprecated
in API level 33.**   

This class is deprecated and subject to removal in a future
version of Java SE. It has been replaced by `java.security.Policy`
and related classes since 1.2.

This interface is used to represent a group of principals. (A principal
represents an entity such as an individual user or a company).


Note that Group extends Principal. Thus, either a Principal or a Group can
be passed as an argument to methods containing a Principal parameter. For
example, you can add either a Principal or a Group to a Group object by
calling the object's `addMember` method, passing it the
Principal or Group.

## Summary

| ### Public methods ||
|---|---|
| ` abstract boolean` | ` https://developer.android.com/reference/java/security/acl/Group#addMember(java.security.Principal)(https://developer.android.com/reference/java/security/Principal user) ` Adds the specified member to the group. |
| ` abstract boolean` | ` https://developer.android.com/reference/java/security/acl/Group#isMember(java.security.Principal)(https://developer.android.com/reference/java/security/Principal member) ` Returns true if the passed principal is a member of the group. |
| ` abstract https://developer.android.com/reference/java/util/Enumeration<? extends https://developer.android.com/reference/java/security/Principal>` | ` https://developer.android.com/reference/java/security/acl/Group#members()() ` Returns an enumeration of the members in the group. |
| ` abstract boolean` | ` https://developer.android.com/reference/java/security/acl/Group#removeMember(java.security.Principal)(https://developer.android.com/reference/java/security/Principal user) ` Removes the specified member from the group. |

| ### Inherited methods |
|---|---|
| From interface ` https://developer.android.com/reference/java/security/Principal ` |---|---| | ` abstract boolean` | ` https://developer.android.com/reference/java/security/Principal#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object another) ` Compares this principal to the specified object. | | ` abstract https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/java/security/Principal#getName()() ` Returns the name of this principal. | | ` abstract int` | ` https://developer.android.com/reference/java/security/Principal#hashCode()() ` Returns a hashcode for this principal. | | ` default boolean` | ` https://developer.android.com/reference/java/security/Principal#implies(javax.security.auth.Subject)(https://developer.android.com/reference/javax/security/auth/Subject subject) ` Returns true if the specified subject is implied by this principal. | | ` abstract https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/java/security/Principal#toString()() ` Returns a string representation of this principal. | ||

## Public methods

### addMember

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract boolean addMember (Principal user)
```

Adds the specified member to the group.

<br />

| Parameters ||
|---|---|
| `user` | `Principal`: the principal to add to this group. <br /> |

| Returns ||
|---|---|
| `boolean` | true if the member was successfully added, false if the principal was already a member. <br /> |

### isMember

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract boolean isMember (Principal member)
```

Returns true if the passed principal is a member of the group.
This method does a recursive search, so if a principal belongs to a
group which is a member of this group, true is returned.

<br />

| Parameters ||
|---|---|
| `member` | `Principal`: the principal whose membership is to be checked. <br /> |

| Returns ||
|---|---|
| `boolean` | true if the principal is a member of this group, false otherwise. <br /> |

### members

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract Enumeration<? extends Principal> members ()
```

Returns an enumeration of the members in the group.
The returned objects can be instances of either Principal
or Group (which is a subclass of Principal).

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/util/Enumeration<? extends https://developer.android.com/reference/java/security/Principal>` | an enumeration of the group members. <br /> |

### removeMember

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract boolean removeMember (Principal user)
```

Removes the specified member from the group.

<br />

| Parameters ||
|---|---|
| `user` | `Principal`: the principal to remove from this group. <br /> |

| Returns ||
|---|---|
| `boolean` | true if the principal was removed, or false if the principal was not a member. <br /> |