BasicPermissionCollection

A BasicPermissionCollection stores a collection of BasicPermission permissions. BasicPermission objects must be stored in a manner that allows them to be inserted in any order, but enable the implies function to evaluate the implies method in an efficient (and consistent) manner.

A BasicPermissionCollection handles comparing a permission like "a.b.c.d.e" with a Permission such as "a.b.*", or "*".

@see java.security.Permission @see java.security.Permissions

More...

Constructors

this
this(Object clazz)

Create an empty BasicPermissionCollection object.

Members

Functions

add
void add(Permission permission)

Adds a permission to the BasicPermissions. The key for the hash is permission.path.

elements
Enumeration!Permission elements()

Returns an enumeration of all the BasicPermission objects in the container.

implies
bool implies(Permission permission)

Check and see if this set of permissions implies the permissions expressed in "permission".

Inherited Members

From PermissionCollection

add
void add(Permission permission)

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

implies
bool implies(Permission permission)

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

elements
Enumeration!Permission elements()

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

setReadOnly
void setReadOnly()

Marks this PermissionCollection object as "readonly". After a PermissionCollection object is marked as readonly, no new Permission objects can be added to it using {@code add}.

isReadOnly
bool isReadOnly()

Returns true if this PermissionCollection object is marked as readonly. If it is readonly, no new Permission objects can be added to it using {@code add}.

toString
string toString()

Returns a string describing this PermissionCollection object, providing information about all the permissions it contains. The format is: <pre> super.toString() ( // enumerate all the Permission // objects and call toString() on them, // one per line.. )</pre>

Detailed Description

@author Roland Schemers

@serial include

Meta