java.security
Class AllPermissionCollection

java.lang.Object
  |
  +--java.security.PermissionCollection
        |
        +--java.security.AllPermissionCollection
All Implemented Interfaces:
Serializable

final class AllPermissionCollection
extends PermissionCollection
implements Serializable

A AllPermissionCollection stores a collection of AllPermission permissions. AllPermission 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.

Version:
1.15 12/03/01
Author:
Roland Schemers
See Also:
java.security.Permission, java.security.Permissions, Serialized Form

Field Summary
private  boolean all_allowed
           
private static long serialVersionUID
           
 
Fields inherited from class java.security.PermissionCollection
 
Constructor Summary
AllPermissionCollection()
          Create an empty AllPermissions object.
 
Method Summary
 void add(Permission permission)
          Adds a permission to the AllPermissions.
 Enumeration elements()
          Returns an enumeration of all the AllPermission objects in the container.
 boolean implies(Permission permission)
          Check and see if this set of permissions implies the permissions expressed in "permission".
 
Methods inherited from class java.security.PermissionCollection
isReadOnly, setReadOnly, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID

all_allowed

private boolean all_allowed
Constructor Detail

AllPermissionCollection

public AllPermissionCollection()
Create an empty AllPermissions object.

Method Detail

add

public void add(Permission permission)
Adds a permission to the AllPermissions. The key for the hash is permission.path.

Specified by:
add in class PermissionCollection
Parameters:
permission - the Permission object to add.

implies

public boolean implies(Permission permission)
Check and see if this set of permissions implies the permissions expressed in "permission".

Specified by:
implies in class PermissionCollection
Parameters:
permission - the Permission object to compare.
Returns:
always returns true.

elements

public Enumeration elements()
Returns an enumeration of all the AllPermission objects in the container.

Specified by:
elements in class PermissionCollection
Returns:
an enumeration of all the AllPermission objects.


comments?