public final class AclEntry extends Object
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 - typecomponent determines if the entry grants or denies access.
- The - principalcomponent, sometimes called the "who" component, is a- UserPrincipalcorresponding to the identity that the entry grants or denies access
- The - permissionscomponent is a set of- permissions
- The - flagscomponent is a set of- flagsto indicate how entries are inherited and propagated
 ACL entries are created using an associated AclEntry.Builder object by
 invoking its build method.
 
ACL entries are immutable and are safe for use by multiple concurrent threads.
- Since:
- 1.7
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classAclEntry.BuilderA builder ofAclEntryobjects.
- 
Method SummaryModifier and Type Method Description booleanequals(Object ob)Compares the specified object with this ACL entry for equality.Set<AclEntryFlag>flags()Returns a copy of the flags component.inthashCode()Returns the hash-code value for this ACL entry.static AclEntry.BuildernewBuilder()Constructs a new builder.static AclEntry.BuildernewBuilder(AclEntry entry)Constructs a new builder with the components of an existing ACL entry.Set<AclEntryPermission>permissions()Returns a copy of the permissions component.UserPrincipalprincipal()Returns the principal component.StringtoString()Returns the string representation of this ACL entry.AclEntryTypetype()Returns the ACL entry type.
- 
Method Details- 
newBuilderConstructs a new builder. The initial value of the type and who components isnull. The initial value of the permissions and flags components is the empty set.- Returns:
- a new builder
 
- 
newBuilderConstructs a new builder with the components of an existing ACL entry.- Parameters:
- entry- an ACL entry
- Returns:
- a new builder
 
- 
typeReturns the ACL entry type.- Returns:
- the ACL entry type
 
- 
principalReturns the principal component.- Returns:
- the principal component
 
- 
permissionsReturns a copy of the permissions component.The returned set is a modifiable copy of the permissions. - Returns:
- the permissions component
 
- 
flagsReturns a copy of the flags component.The returned set is a modifiable copy of the flags. - Returns:
- the flags component
 
- 
equalsCompares the specified object with this ACL entry for equality.If the given object is not an AclEntrythen this method immediately returnsfalse.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.equalsmethod.- Overrides:
- equalsin class- Object
- Parameters:
- ob- the object to which this object is to be compared
- Returns:
- trueif, and only if, the given object is an AclEntry that is identical to this AclEntry
- See Also:
- Object.hashCode(),- HashMap
 
- 
hashCodepublic int hashCode()Returns the hash-code value for this ACL entry.This method satisfies the general contract of the Object.hashCode()method.- Overrides:
- hashCodein class- Object
- Returns:
- a hash code value for this object.
- See Also:
- Object.equals(java.lang.Object),- System.identityHashCode(java.lang.Object)
 
- 
toStringReturns the string representation of this ACL entry.
 
-