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().

  • Method Details

    • getOwner

      public String getOwner()
      The owner is always granted and can only be changed by the owner.
      Specified by:
      getOwner in interface AccessControlList
      Returns:
      the owner
    • getEntries

      public Collection<AccessControlEntry> getEntries()
      Get entries.
      Specified by:
      getEntries in interface AccessControlList
      Returns:
      the entries
    • withOwner

      public final ImmutableAccessControlList withOwner(String value)
      Copy the current immutable object by setting a value for the owner attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for owner
      Returns:
      A modified copy or the this object
    • withEntries

      public final ImmutableAccessControlList withEntries(Collection<AccessControlEntry> value)
      Copy the current immutable object by setting a value for the entries attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for entries
      Returns:
      A modified copy or the this object
    • equals

      public boolean equals(Object another)
      This instance is equal to all instances of ImmutableAccessControlList that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: owner, entries.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value AccessControlList with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      public static ImmutableAccessControlList copyOf(AccessControlList instance)
      Creates an immutable copy of a AccessControlList value. 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

      public static ImmutableAccessControlList.Builder builder()
      Creates a builder for ImmutableAccessControlList.
       ImmutableAccessControlList.builder()
          .owner(String) // optional owner
          .entries(Collection<org.bremersee.acl.model.AccessControlEntry>) // optional entries
          .build();
       
      Returns:
      A new ImmutableAccessControlList builder