# AclEntry.Builder

public static final class **AclEntry.Builder** extends [Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html)  
A builder of `https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/file/attribute/AclEntry.html` objects.

A `Builder` object is obtained by invoking one of the `https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/file/attribute/AclEntry.html#newBuilder()` methods defined by the `AclEntry`
class.

Builder objects are mutable and are not safe for use by multiple
concurrent threads without appropriate synchronization.

### Public Method Summary

|---|---|
| [AclEntry](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/file/attribute/AclEntry.html) | [build](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/file/attribute/AclEntry.Builder.html#build())() Constructs an `https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/file/attribute/AclEntry.html` from the components of this builder. |
| [AclEntry.Builder](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/file/attribute/AclEntry.Builder.html) | [setFlags](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/file/attribute/AclEntry.Builder.html#setFlags(java.util.Set<java.nio.file.attribute.AclEntryFlag>))([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) Sets the flags component of this builder. |
| [AclEntry.Builder](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/file/attribute/AclEntry.Builder.html) | [setFlags](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/file/attribute/AclEntry.Builder.html#setFlags(java.nio.file.attribute.AclEntryFlag...))([AclEntryFlag...](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/file/attribute/AclEntryFlag.html) flags) Sets the flags component of this builder. |
| [AclEntry.Builder](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/file/attribute/AclEntry.Builder.html) | [setPermissions](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/file/attribute/AclEntry.Builder.html#setPermissions(java.util.Set<java.nio.file.attribute.AclEntryPermission>))([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)\> perms) Sets the permissions component of this builder. |
| [AclEntry.Builder](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/file/attribute/AclEntry.Builder.html) | [setPermissions](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/file/attribute/AclEntry.Builder.html#setPermissions(java.nio.file.attribute.AclEntryPermission...))([AclEntryPermission...](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/file/attribute/AclEntryPermission.html) perms) Sets the permissions component of this builder. |
| [AclEntry.Builder](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/file/attribute/AclEntry.Builder.html) | [setPrincipal](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/file/attribute/AclEntry.Builder.html#setPrincipal(java.nio.file.attribute.UserPrincipal))([UserPrincipal](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/file/attribute/UserPrincipal.html) who) Sets the principal component of this builder. |
| [AclEntry.Builder](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/file/attribute/AclEntry.Builder.html) | [setType](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/file/attribute/AclEntry.Builder.html#setType(java.nio.file.attribute.AclEntryType))([AclEntryType](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/file/attribute/AclEntryType.html) type) Sets the type component of this builder. |

### 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 [AclEntry](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/file/attribute/AclEntry.html)
**build**
()

Constructs an `https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/file/attribute/AclEntry.html` from the components of this builder.
The type and who components are required to have been set in order
to construct an `AclEntry`.

##### Returns

- a new ACL entry

##### Throws

| [IllegalStateException](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/IllegalStateException.html) | if the type or who component have not been set |
|---|---|

#### public [AclEntry.Builder](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/file/attribute/AclEntry.Builder.html)
**setFlags**
([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)

Sets the flags component of this builder. On return, the flags
component of this builder is a copy of the given set.

##### Parameters

| flags | the flags component |
|---|---|

##### Returns

- this builder

##### Throws

| [ClassCastException](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/ClassCastException.html) | if the set contains elements that are not of type `AclEntryFlag` |
|---|---|

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

Sets the flags component of this builder. On return, the flags
component of this builder is a copy of the flags in the given
array.

##### Parameters

| flags | the flags component |
|---|---|

##### Returns

- this builder

#### public [AclEntry.Builder](https://developers.google.com/j2objc/javadoc/jre/reference/java/nio/file/attribute/AclEntry.Builder.html)
**setPermissions**
([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)\> perms)

Sets the permissions component of this builder. On return, the
permissions component of this builder is a copy of the given set.

##### Parameters

| perms | the permissions component |
|---|---|

##### Returns

- this builder

##### Throws

| [ClassCastException](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/ClassCastException.html) | if the set contains elements that are not of type `AclEntryPermission` |
|---|---|

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

Sets the permissions component of this builder. On return, the
permissions component of this builder is a copy of the permissions in
the given array.

##### Parameters

| perms | the permissions component |
|---|---|

##### Returns

- this builder

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

Sets the principal component of this builder.

##### Parameters

| who | the principal component |
|---|---|

##### Returns

- this builder

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

Sets the type component of this builder.

##### Parameters

| type | the component type |
|---|---|

##### Returns

- this builder