AclEntry
class AclEntry
kotlin.Any | |
↳ | java.nio.file.attribute.AclEntry |
An entry in an access control list (ACL).
The ACL entry represented by this class is based on the ACL model specified in RFC 3530: Network File System (NFS) version 4 Protocol. Each entry has four components as follows:
- The
type
component determines if the entry grants or denies access. - The
principal
component, sometimes called the "who" component, is aUserPrincipal
corresponding to the identity that the entry grants or denies access - The
permissions
component is a set ofpermissions
- The
flags
component is a set offlags
to indicate how entries are inherited and propagated
ACL entries are created using an associated Builder
object by invoking its build
method.
ACL entries are immutable and are safe for use by multiple concurrent threads.
Summary
Nested classes | |
---|---|
A builder of |
Public methods | |
---|---|
Boolean |
Compares the specified object with this ACL entry for equality. |
MutableSet<AclEntryFlag!>! |
flags() Returns a copy of the flags component. |
Int |
hashCode() Returns the hash-code value for this ACL entry. |
static AclEntry.Builder! |
Constructs a new builder. |
static AclEntry.Builder! |
newBuilder(entry: AclEntry!) Constructs a new builder with the components of an existing ACL entry. |
MutableSet<AclEntryPermission!>! |
Returns a copy of the permissions component. |
UserPrincipal! |
Returns the principal component. |
String |
toString() Returns the string representation of this ACL entry. |
AclEntryType! |
type() Returns the ACL entry type. |
Public methods
equals
fun equals(other: Any?): Boolean
Compares the specified object with this ACL entry for equality.
If the given object is not an AclEntry
then this method immediately returns false
.
For two ACL entries to be considered equals requires that they are both the same type, their who components are equal, their permissions components are equal, and their flags components are equal.
This method satisfies the general contract of the Object.equals
method.
Parameters | |
---|---|
obj |
the reference object with which to compare. |
ob |
the object to which this object is to be compared |
Return | |
---|---|
Boolean |
true if, and only if, the given object is an AclEntry that is identical to this AclEntry |
flags
fun flags(): MutableSet<AclEntryFlag!>!
Returns a copy of the flags component.
The returned set is a modifiable copy of the flags.
Return | |
---|---|
MutableSet<AclEntryFlag!>! |
the flags component |
hashCode
fun hashCode(): Int
Returns the hash-code value for this ACL entry.
This method satisfies the general contract of the java.lang.Object#hashCode
method.
Return | |
---|---|
Int |
a hash code value for this object. |
newBuilder
static fun newBuilder(): AclEntry.Builder!
Constructs a new builder. The initial value of the type and who components is null
. The initial value of the permissions and flags components is the empty set.
Return | |
---|---|
AclEntry.Builder! |
a new builder |
newBuilder
static fun newBuilder(entry: AclEntry!): AclEntry.Builder!
Constructs a new builder with the components of an existing ACL entry.
Parameters | |
---|---|
entry |
AclEntry!: an ACL entry |
Return | |
---|---|
AclEntry.Builder! |
a new builder |
permissions
fun permissions(): MutableSet<AclEntryPermission!>!
Returns a copy of the permissions component.
The returned set is a modifiable copy of the permissions.
Return | |
---|---|
MutableSet<AclEntryPermission!>! |
the permissions component |
principal
fun principal(): UserPrincipal!
Returns the principal component.
Return | |
---|---|
UserPrincipal! |
the principal component |
toString
fun toString(): String
Returns the string representation of this ACL entry.
Return | |
---|---|
String |
the string representation of this entry |
type
fun type(): AclEntryType!
Returns the ACL entry type.
Return | |
---|---|
AclEntryType! |
the ACL entry type |