Record Class PosixAcl.Direct

java.lang.Object
java.lang.Record
com.norconex.crawler.fs.fetch.acl.PosixAcl.Direct
Record Components:
kind - user or group
principal - who
allow - allowed, or denied
rights - the rights concerned, as PosixAcl.READ, PosixAcl.WRITE and PosixAcl.EXECUTE bits
everyone - whether the principal stands for everybody (macOS's everyone group)
Enclosing class:
PosixAcl

public static record PosixAcl.Direct(AclKind kind, PosixAcl.Principal principal, boolean allow, int rights, boolean everyone) extends Record
An entry beside the mode bits that allows or denies rights directly, the way macOS ACL entries do (they are checked before the mode bits).
  • Constructor Details

    • Direct

      public Direct(AclKind kind, PosixAcl.Principal principal, boolean allow, int rights, boolean everyone)
      Creates an instance of a Direct record class.
      Parameters:
      kind - the value for the kind record component
      principal - the value for the principal record component
      allow - the value for the allow record component
      rights - the value for the rights record component
      everyone - the value for the everyone record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • kind

      public AclKind kind()
      Returns the value of the kind record component.
      Returns:
      the value of the kind record component
    • principal

      public PosixAcl.Principal principal()
      Returns the value of the principal record component.
      Returns:
      the value of the principal record component
    • allow

      public boolean allow()
      Returns the value of the allow record component.
      Returns:
      the value of the allow record component
    • rights

      public int rights()
      Returns the value of the rights record component.
      Returns:
      the value of the rights record component
    • everyone

      public boolean everyone()
      Returns the value of the everyone record component.
      Returns:
      the value of the everyone record component