# AclEntry

public final class **AclEntry** extends [Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html)  
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*](http://www.ietf.org/rfc/rfc3530.txt). Each entry has four
components as follows:

1. The `https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/file/attribute/AclEntry.html#type()` component determines if the entry
   grants or denies access.

2. The `https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/file/attribute/AclEntry.html#principal()` component, sometimes called the
   "who" component, is a `https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/file/attribute/UserPrincipal.html` corresponding to the identity
   that the entry grants or denies access

3. The `https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/file/attribute/AclEntry.html#permissions()` component is a set of
   `https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/file/attribute/AclEntryPermission.html`

4. The `https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/file/attribute/AclEntry.html#flags()` component is a set of `https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/file/attribute/AclEntryFlag.html` to indicate how entries are inherited and propagated

ACL entries are created using an associated `https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/file/attribute/AclEntry.Builder.html` object by
invoking its `https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/file/attribute/AclEntry.Builder.html#build()` method.

ACL entries are immutable and are safe for use by multiple concurrent
threads.

### Nested Class Summary

|---|---|---|---|
| class | [AclEntry.Builder](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/file/attribute/AclEntry.Builder.html) || A builder of `https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/file/attribute/AclEntry.html` objects. |

### Public Method Summary

|---|---|
| boolean | [equals](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/file/attribute/AclEntry.html#equals(java.lang.Object))([Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html) ob) Compares the specified object with this ACL entry for equality. |
| [Set](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Set.html)\<[AclEntryFlag](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/file/attribute/AclEntryFlag.html)\> | [flags](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/file/attribute/AclEntry.html#flags())() Returns a copy of the flags component. |
| int | [hashCode](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/file/attribute/AclEntry.html#hashCode())() Returns the hash-code value for this ACL entry. |
| static [AclEntry.Builder](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/file/attribute/AclEntry.Builder.html) | [newBuilder](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/file/attribute/AclEntry.html#newBuilder(java.nio.file.attribute.AclEntry))([AclEntry](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/file/attribute/AclEntry.html) entry) Constructs a new builder with the components of an existing ACL entry. |
| static [AclEntry.Builder](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/file/attribute/AclEntry.Builder.html) | [newBuilder](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/file/attribute/AclEntry.html#newBuilder())() Constructs a new builder. |
| [Set](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Set.html)\<[AclEntryPermission](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/file/attribute/AclEntryPermission.html)\> | [permissions](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/file/attribute/AclEntry.html#permissions())() Returns a copy of the permissions component. |
| [UserPrincipal](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/file/attribute/UserPrincipal.html) | [principal](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/file/attribute/AclEntry.html#principal())() Returns the principal component. |
| [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) | [toString](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/file/attribute/AclEntry.html#toString())() Returns the string representation of this ACL entry. |
| [AclEntryType](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/file/attribute/AclEntryType.html) | [type](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/file/attribute/AclEntry.html#type())() Returns the ACL entry type. |

### Inherited Method Summary

From class [java.lang.Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html)

|---|---|
| [Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html) | [clone](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#clone())() Creates and returns a copy of this `Object`. |
| boolean | [equals](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#equals(java.lang.Object))([Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html) obj) Compares this instance with the specified object and indicates if they are equal. |
| void | [finalize](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#finalize())() Invoked when the garbage collector has detected that this instance is no longer reachable. |
| final [Class](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Class.html)\<?\> | [getClass](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#getClass())() Returns the unique instance of `https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Class.html` that represents this object's class. |
| int | [hashCode](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#hashCode())() Returns an integer hash code for this object. |
| final void | [notify](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#notify())() Causes a thread which is waiting on this object's monitor (by means of calling one of the `wait()` methods) to be woken up. |
| final void | [notifyAll](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#notifyAll())() Causes all threads which are waiting on this object's monitor (by means of calling one of the `wait()` methods) to be woken up. |
| [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) | [toString](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#toString())() Returns a string containing a concise, human-readable description of this object. |
| final void | [wait](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#wait(long,%20int))(long timeout, int nanos) Causes the calling thread to wait until another thread calls the `notify()` or `notifyAll()` method of this object or until the specified timeout expires. |
| final void | [wait](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#wait(long))(long timeout) Causes the calling thread to wait until another thread calls the `notify()` or `notifyAll()` method of this object or until the specified timeout expires. |
| final void | [wait](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#wait())() Causes the calling thread to wait until another thread calls the `notify()` or `notifyAll()` method of this object. |

## Public Methods

#### public boolean
**equals**
([Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html) ob)

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 `https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#equals(java.lang.Object)` method.

<br />

##### Parameters

| ob | the object to which this object is to be compared |
|---|---|

##### Returns

- `true` if, and only if, the given object is an AclEntry that is identical to this AclEntry

#### public [Set](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Set.html)\<[AclEntryFlag](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/file/attribute/AclEntryFlag.html)\>
**flags**
()

Returns a copy of the flags component.

The returned set is a modifiable copy of the flags.

##### Returns

- the flags component

#### public int
**hashCode**
()

Returns the hash-code value for this ACL entry.

This method satisfies the general contract of the `https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#hashCode()` method.

##### Returns

- this object's hash code.

#### public static [AclEntry.Builder](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/file/attribute/AclEntry.Builder.html)
**newBuilder**
([AclEntry](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/file/attribute/AclEntry.html) entry)

Constructs a new builder with the components of an existing ACL entry.

##### Parameters

| entry | an ACL entry |
|---|---|

##### Returns

- a new builder

#### public static [AclEntry.Builder](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/file/attribute/AclEntry.Builder.html)
**newBuilder**
()

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.

##### Returns

- a new builder

#### public [Set](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Set.html)\<[AclEntryPermission](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/file/attribute/AclEntryPermission.html)\>
**permissions**
()

Returns a copy of the permissions component.

The returned set is a modifiable copy of the permissions.

##### Returns

- the permissions component

#### public [UserPrincipal](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/file/attribute/UserPrincipal.html)
**principal**
()

Returns the principal component.

##### Returns

- the principal component

#### public [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html)
**toString**
()

Returns the string representation of this ACL entry.

##### Returns

- the string representation of this entry

#### public [AclEntryType](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/file/attribute/AclEntryType.html)
**type**
()

Returns the ACL entry type.

##### Returns

- the ACL entry type