Package org.bremersee.acl.model
Class ImmutableAccessControlList
java.lang.Object
org.bremersee.acl.model.ImmutableAccessControlList
- All Implemented Interfaces:
AccessControlList
@Generated(from="AccessControlList",
generator="Immutables")
@Generated("org.immutables.processor.ProxyProcessor")
public final class ImmutableAccessControlList
extends Object
implements AccessControlList
Immutable implementation of
AccessControlList.
Use the builder to create immutable instances:
ImmutableAccessControlList.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableAccessControlList. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableAccessControlList.static ImmutableAccessControlListcopyOf(AccessControlList instance) Creates an immutable copy of aAccessControlListvalue.booleanThis instance is equal to all instances ofImmutableAccessControlListthat have equal attribute values.Get entries.getOwner()The owner is always granted and can only be changed by the owner.inthashCode()Computes a hash code from attributes:owner,entries.toString()Prints the immutable valueAccessControlListwith attribute values.withEntries(Collection<AccessControlEntry> value) Copy the current immutable object by setting a value for theentriesattribute.Copy the current immutable object by setting a value for theownerattribute.
-
Method Details
-
getOwner
The owner is always granted and can only be changed by the owner.- Specified by:
getOwnerin interfaceAccessControlList- Returns:
- the owner
-
getEntries
Get entries.- Specified by:
getEntriesin interfaceAccessControlList- Returns:
- the entries
-
withOwner
Copy the current immutable object by setting a value for theownerattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for owner- Returns:
- A modified copy or the
thisobject
-
withEntries
Copy the current immutable object by setting a value for theentriesattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for entries- Returns:
- A modified copy or the
thisobject
-
equals
This instance is equal to all instances ofImmutableAccessControlListthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:owner,entries. -
toString
Prints the immutable valueAccessControlListwith attribute values. -
copyOf
Creates an immutable copy of aAccessControlListvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable AccessControlList instance
-
builder
Creates a builder forImmutableAccessControlList.ImmutableAccessControlList.builder() .owner(String) // optionalowner.entries(Collection<org.bremersee.acl.model.AccessControlEntry>) // optionalentries.build();- Returns:
- A new ImmutableAccessControlList builder
-