A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/security/Permissions.html below:

Permissions (Java SE 21 & JDK 21)

All Implemented Interfaces:
Serializable

This class represents a heterogeneous collection of permissions. That is, it contains different types of

Permission

objects, organized into

PermissionCollection

objects. For example, if any

java.io.FilePermission

objects are added to an instance of this class, they are all stored in a single

PermissionCollection

. It is the

PermissionCollection

returned by a call to the

newPermissionCollection

method in the

FilePermission

class. Similarly, any

java.lang.RuntimePermission

objects are stored in the

PermissionCollection

returned by a call to the

newPermissionCollection

method in the

RuntimePermission

class. Thus, this class represents a collection of

PermissionCollection

objects.

When the add method is called to add a Permission, the Permission is stored in the appropriate PermissionCollection. If no such collection exists yet, the Permission object's class is determined and the newPermissionCollection method is called on that class to create the PermissionCollection and add it to the Permissions object. If newPermissionCollection returns null, then a default PermissionCollection that uses a hashtable will be created and used. Each hashtable entry stores a Permission object as both the key and the value.

Enumerations returned via the elements method are not fail-fast. Modifications to a collection should not be performed while enumerating over that collection.

Since:
1.2
See Also:

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4