public final class

Permissions

extends PermissionCollection
implements Serializable
java.lang.Object
   ↳ java.security.PermissionCollection
     ↳ java.security.Permissions

Class Overview

Permissions represents a PermissionCollection where the contained permissions can be of different types. The permissions are organized in their appropriate PermissionCollection obtained by newPermissionCollection(). For permissions which do not provide a dedicated PermissionCollection, a default permission collection, based on a hash table, will be used.

Summary

Public Constructors
Permissions()
Public Methods
void add(Permission permission)
Adds the given Permission to this heterogeneous PermissionCollection.
Enumeration<Permission> elements()
Returns an enumeration over all Permissions encapsulated by this PermissionCollection.
boolean implies(Permission permission)
Indicates whether the specified permission is implied by this PermissionCollection.
[Expand]
Inherited Methods
From class java.security.PermissionCollection
From class java.lang.Object

Public Constructors

public Permissions ()

Public Methods

public void add (Permission permission)

Adds the given Permission to this heterogeneous PermissionCollection. The permission is stored in its appropriate PermissionCollection.

Parameters
permission the Permission to be added.
Throws
SecurityException if this collection's isReadOnly() method returns true.
NullPointerException if permission is null.

public Enumeration<Permission> elements ()

Returns an enumeration over all Permissions encapsulated by this PermissionCollection.

Returns

public boolean implies (Permission permission)

Indicates whether the specified permission is implied by this PermissionCollection.

Parameters
permission the permission to check.
Returns
  • true if the given permission is implied by the permissions in this collection, false otherwise.