java.security
Class PermissionsHash

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

final class PermissionsHash
extends PermissionCollection
implements Serializable

A PermissionsHash stores a homogeneous set of permissions in a hashtable.

Version:
1.50, 02/01/02
Author:
Roland Schemers
See Also:
Permission, Permissions, Serialized Form

Field Summary
private  Hashtable perms
           
 
Fields inherited from class java.security.PermissionCollection
 
Constructor Summary
(package private) PermissionsHash()
          Create an empty PermissionsHash object.
 
Method Summary
 void add(Permission permission)
          Adds a permission to the PermissionsHash.
 Enumeration elements()
          Returns an enumeration of all the Permission 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

perms

private Hashtable perms
Constructor Detail

PermissionsHash

PermissionsHash()
Create an empty PermissionsHash object.

Method Detail

add

public void add(Permission permission)
Adds a permission to the PermissionsHash.

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:
true if "permission" is a proper subset of a permission in the set, false if not.

elements

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

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


comments?