public final class DOFPermissionSet extends java.lang.Object implements org.opendof.core.internal.protocol.Marshallable, DOFImmutable, java.io.Serializable, java.lang.Iterable<DOFPermission>
DOFPermissionSet.Builder
,
Serialized FormModifier and Type | Class and Description |
---|---|
static class |
DOFPermissionSet.Builder
This is the builder for a DOFPermissionSet.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object other) |
byte[] |
getBytes()
Get the serialized bytes of the permission set.
|
DOFPermissionSet |
getComplement()
Return the complement for this permission set.
|
java.util.List<DOFPermission> |
getPermissions()
Get a copy of the permission list for this permission set.
|
int |
hashCode() |
boolean |
isAllowedBy(DOFPermissionSet permissionSet)
Returns whether or not this permission set is a subset of the permissions
allowed by the specified permission set.
|
java.util.Iterator<DOFPermission> |
iterator() |
void |
marshal(DOFMarshalContext context,
java.lang.Object state,
DOFPacket p)
Write an object to a serialized form to the specified buffer, according
to the context specified and with the given state.
|
int |
size()
Get the size of the permission set.
|
java.lang.String |
toString() |
public byte[] getBytes()
public java.util.List<DOFPermission> getPermissions()
public boolean isAllowedBy(DOFPermissionSet permissionSet)
permissionSet
- The permission set to compare permissions against. If null, then false is returned.public DOFPermissionSet getComplement()
DOFPermission.getComplement()
public int size()
public java.util.Iterator<DOFPermission> iterator()
iterator
in interface java.lang.Iterable<DOFPermission>
public java.lang.String toString()
toString
in class java.lang.Object
public void marshal(DOFMarshalContext context, java.lang.Object state, DOFPacket p) throws DOFMarshalException
org.opendof.core.internal.protocol.Marshallable
marshal
in interface org.opendof.core.internal.protocol.Marshallable
context
- The context of the marshaling to be performed.state
- The state in which the marshalling is done. This may affect the result.p
- The buffer which will receive the marshaled data. Must not be null.DOFMarshalException
- If there are errors in the data or the buffer.public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object