Class BooleanPermissionCollection
java.lang.Object
java.security.PermissionCollection
org.wildfly.security.permission.AbstractPermissionCollection
org.wildfly.security.permission.BooleanPermissionCollection
- All Implemented Interfaces:
Serializable, Iterable<Permission>, PermissionVerifier
A permission collection type which either does or does not hold its instance.
- Author:
- David M. Lloyd
- See Also:
-
Field Summary
Fields inherited from interface PermissionVerifier
ALL, NONE -
Constructor Summary
ConstructorsConstructorDescriptionBooleanPermissionCollection(AbstractPermission<?> sourcePermission) Construct a new instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoAdd(AbstractPermission<?> permission) Perform the work of adding a permission.elements()Iterate over this permission collection.booleanimplies(Permission permission) Determine if the permission is verified by this object.iterator()Iterate over this permission collection.intsize()Get the size of this permission collection.Methods inherited from class AbstractPermissionCollection
addMethods inherited from class PermissionCollection
elementsAsStream, isReadOnly, setReadOnly, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Iterable
forEach, spliteratorMethods inherited from interface PermissionVerifier
and, checkPermission, not, or, toPermissionCollection, unless, xor
-
Constructor Details
-
BooleanPermissionCollection
Construct a new instance.- Parameters:
sourcePermission- the source permission for this collection (must not benull)
-
-
Method Details
-
size
public int size()Description copied from class:AbstractPermissionCollectionGet the size of this permission collection.- Specified by:
sizein classAbstractPermissionCollection- Returns:
- the size of this permission collection
-
iterator
Description copied from class:AbstractPermissionCollectionIterate over this permission collection.- Specified by:
iteratorin interfaceIterable<Permission>- Specified by:
iteratorin classAbstractPermissionCollection- Returns:
- the iterator (not
null)
-
elements
Description copied from class:AbstractPermissionCollectionIterate over this permission collection.- Specified by:
elementsin classAbstractPermissionCollection- Returns:
- the iterator (not
null)
-
doAdd
Description copied from class:AbstractPermissionCollectionPerform the work of adding a permission. The permission is guaranteed to be of the correct type and the collection is guaranteed to have been writable at the time theAbstractPermissionCollection.add(Permission)method was called.- Specified by:
doAddin classAbstractPermissionCollection- Parameters:
permission- the non-nullpermission
-
implies
Description copied from interface:PermissionVerifierDetermine if the permission is verified by this object.- Specified by:
impliesin interfacePermissionVerifier- Specified by:
impliesin classPermissionCollection- Parameters:
permission- the permission to verify (must not benull)- Returns:
trueif the permission is implied by this verifier,falseotherwise
-