# PermissionCollection

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

# PermissionCollection

`
public


abstract
class
PermissionCollection
`  
`

extends `[Object](https://developer.android.com/reference/java/lang/Object)`


``


implements

`[Serializable](https://developer.android.com/reference/java/io/Serializable)`


`

|---|------------------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | java.security.PermissionCollection |

|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Known direct subclasses [Permissions](https://developer.android.com/reference/java/security/Permissions) |----------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------| | [Permissions](https://developer.android.com/reference/java/security/Permissions) | Android doesn't support[SecurityManager](https://developer.android.com/reference/java/lang/SecurityManager). | |

<br />

*** ** * ** ***

Android doesn't support[SecurityManager](https://developer.android.com/reference/java/lang/SecurityManager). Do not use this class.

## Summary

|                                                       ### Public constructors                                                        ||
|-----------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[PermissionCollection](https://developer.android.com/reference/java/security/PermissionCollection#PermissionCollection())`() ` |

|                                                                                                                                                                                                                                                            ### Public methods                                                                                                                                                                                                                                                            ||
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` abstract void`                                                                                                                                                             | ` `[add](https://developer.android.com/reference/java/security/PermissionCollection#add(java.security.Permission))`(`[Permission](https://developer.android.com/reference/java/security/Permission)` permission) ` Adds a permission object to the current collection of permission objects.                                                               |
| ` abstract `[Enumeration](https://developer.android.com/reference/java/util/Enumeration)`<`[Permission](https://developer.android.com/reference/java/security/Permission)`>` | ` `[elements](https://developer.android.com/reference/java/security/PermissionCollection#elements())`() ` Returns an enumeration of all the Permission objects in the collection.                                                                                                                                                                          |
| ` abstract boolean`                                                                                                                                                          | ` `[implies](https://developer.android.com/reference/java/security/PermissionCollection#implies(java.security.Permission))`(`[Permission](https://developer.android.com/reference/java/security/Permission)` permission) ` Checks to see if the specified permission is implied by the collection of Permission objects held in this PermissionCollection. |
| ` boolean`                                                                                                                                                                   | ` `[isReadOnly](https://developer.android.com/reference/java/security/PermissionCollection#isReadOnly())`() `                                                                                                                                                                                                                                              |
| ` void`                                                                                                                                                                      | ` `[setReadOnly](https://developer.android.com/reference/java/security/PermissionCollection#setReadOnly())`() `                                                                                                                                                                                                                                            |

| ### Inherited methods |
|-----------------------|---|
| From class` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object)` ` |--------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object)          | ` `[clone](https://developer.android.com/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object.                                                                                                                                                      | | ` boolean`                                                                     | ` `[equals](https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` obj) ` Indicates whether some other object is "equal to" this one.                                           | | ` void`                                                                        | ` `[finalize](https://developer.android.com/reference/java/lang/Object#finalize())`() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.                                                          | | ` final `[Class](https://developer.android.com/reference/java/lang/Class)`<?>` | ` `[getClass](https://developer.android.com/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this`Object`.                                                                                                                                                | | ` int`                                                                         | ` `[hashCode](https://developer.android.com/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object.                                                                                                                                                 | | ` final void`                                                                  | ` `[notify](https://developer.android.com/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor.                                                                                                                            | | ` final void`                                                                  | ` `[notifyAll](https://developer.android.com/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor.                                                                                                                         | | ` `[String](https://developer.android.com/reference/java/lang/String)          | ` `[toString](https://developer.android.com/reference/java/lang/Object#toString())`() ` Returns a string representation of the object.                                                                                                                                            | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long,%20int))`(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed. | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long))`(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed.                   | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*.                                                                                             | ||

## Public constructors

### PermissionCollection

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

```
public PermissionCollection ()
```

<br />

<br />

## Public methods

### add

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

```
public abstract void add (Permission permission)
```

Adds a permission object to the current collection of permission objects.

<br />

|                            Parameters                            ||
|--------------|----------------------------------------------------|
| `permission` | `Permission`: the Permission object to add. <br /> |

|                                                                                                          Throws                                                                                                          ||
|--------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------|
| [SecurityException](https://developer.android.com/reference/java/lang/SecurityException)               | - if this PermissionCollection object has been marked readonly                                                   |
| [IllegalArgumentException](https://developer.android.com/reference/java/lang/IllegalArgumentException) | - if this PermissionCollection object is a homogeneous collection and the permission is not of the correct type. |

### elements

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

```
public abstract Enumeration<Permission> elements ()
```

Returns an enumeration of all the Permission objects in the collection.

<br />

|                                                                                                     Returns                                                                                                     ||
|------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------|
| [Enumeration](https://developer.android.com/reference/java/util/Enumeration)`<`[Permission](https://developer.android.com/reference/java/security/Permission)`>` | an enumeration of all the Permissions. <br /> |

### implies

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

```
public abstract boolean implies (Permission permission)
```

Checks to see if the specified permission is implied by the collection of Permission objects held in this PermissionCollection.

<br />

|                              Parameters                              ||
|--------------|--------------------------------------------------------|
| `permission` | `Permission`: the Permission object to compare. <br /> |

|                                                Returns                                                ||
|-----------|--------------------------------------------------------------------------------------------|
| `boolean` | true if "permission" is implied by the permissions in the collection, false if not. <br /> |

### isReadOnly

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

```
public boolean isReadOnly ()
```

<br />

<br />

|      Returns      ||
|-----------|--------|
| `boolean` | <br /> |

### setReadOnly

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

```
public void setReadOnly ()
```

<br />

<br />