public final class Permissions extends PermissionCollection implements Serializable
PermissionCollection
's stored
in a hashtable. Each individual PermissionCollection
contains permissions of a single type. If a specific type of
Permission
does not provide a collection type to use
via its newPermissionCollection
method, then a default
collection type which stores its permissions in a hash table will be
used.Constructor and Description |
---|
Permissions()
This method initializes a new instance of
Permissions . |
Modifier and Type | Method and Description |
---|---|
void |
add(Permission perm)
This method adds a new
Permission to this collection. |
Enumeration<Permission> |
elements()
This method returns an
Enumeration which contains a
list of all Permission objects contained in this
collection. |
boolean |
implies(Permission perm)
This method tests whether or not the specified
Permission
is implied by this PermissionCollection . |
isReadOnly, setReadOnly, toString
public Permissions()
Permissions
.public void add(Permission perm)
Permission
to this collection. It
will be stored in a PermissionCollection
of the appropriate
type, as determined by calling newPermissionCollection
on
the specified permission (if an appropriate collection does not already
exist). If this object does not specify a particular type of collection,
a default collection, which stores in permissions in a hash table, will
be used.add
in class PermissionCollection
perm
- the Permission
to addSecurityException
- if this collection is marked as read onlypublic boolean implies(Permission perm)
Permission
is implied by this PermissionCollection
.implies
in class PermissionCollection
perm
- the Permission
to testpublic Enumeration<Permission> elements()
Enumeration
which contains a
list of all Permission
objects contained in this
collection.elements
in class PermissionCollection
Enumeration
of this collection's elements