public static final class DOFPermissionSet.Builder
extends java.lang.Object
| Constructor and Description |
|---|
Builder()
Create a builder with no existing entries.
|
Builder(byte[] data)
Create an instance from serial form.
|
Builder(DOFMarshalContext context,
java.lang.Object state,
DOFPacket p)
Create an instance from marshaled form.
|
Builder(DOFPermissionSet permissions)
Construct a builder from an existing permission set.
|
| Modifier and Type | Method and Description |
|---|---|
DOFPermissionSet.Builder |
addPermission(DOFPermission... permissions)
Add a variable number of permissions.
|
DOFPermissionSet.Builder |
addPermissions(java.util.Collection<DOFPermission> permissions)
Add a collection of permissions.
|
DOFPermissionSet.Builder |
addPermissions(DOFPermissionSet permissions)
Add all permissions from another permission set.
|
DOFPermissionSet |
build()
Construct a new DOFPermissionSet based on the builder's current set of permissions.
|
public Builder()
public Builder(DOFPermissionSet permissions)
permissions - Permission set to use as a starting point for the newly constructed builder.public Builder(DOFMarshalContext context, java.lang.Object state, DOFPacket p) throws DOFMarshalException
context - The context of the unmarshaling to be performed.state - The state in which the unmarshaling is done. This parameter is currently ignored.p - The buffer which contains the serialized form of the object. Must not be null.DOFMarshalException - If there are errors in the data or the buffer. This is an exception to the rule that
non-RuntimeExceptions not be thrown from a constructor.Marshallablepublic Builder(byte[] data)
throws DOFMarshalException
data - The array which contains the serialized form of the object. Must not be null.DOFMarshalException - If there are errors in the data or the buffer. This is an exception to the rule that
non-RuntimeExceptions not be thrown from a constructor.Marshallablepublic DOFPermissionSet.Builder addPermission(DOFPermission... permissions)
permissions - The permissions to add.public DOFPermissionSet.Builder addPermissions(java.util.Collection<DOFPermission> permissions)
permissions - A collection of permissions to add. Null is ignored.public DOFPermissionSet.Builder addPermissions(DOFPermissionSet permissions)
permissions - The permissions to add. Null is ignored.public DOFPermissionSet build()