/// <summary> /// Compares the specified object with this ACL entry for equality. /// /// <para> If the given object is not an {@code AclEntry} then this method /// immediately returns {@code false}. /// /// </para> /// <para> 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. /// /// </para> /// <para> This method satisfies the general contract of the {@link /// java.lang.Object#equals(Object) Object.equals} method. </para> /// </summary> /// <param name="ob"> the object to which this object is to be compared /// </param> /// <returns> {@code true} if, and only if, the given object is an AclEntry that /// is identical to this AclEntry </returns> public override bool Equals(Object ob) { if (ob == this) { return(true); } if (ob == null || !(ob is AclEntry)) { return(false); } AclEntry other = (AclEntry)ob; if (this.Type_Renamed != other.Type_Renamed) { return(false); } if (!this.Who.Equals(other.Who)) { return(false); } if (!this.Perms.Equals(other.Perms)) { return(false); } if (!this.Flags_Renamed.Equals(other.Flags_Renamed)) { return(false); } return(true); }
/// <summary> /// Constructs a new builder with the components of an existing ACL entry. /// </summary> /// <param name="entry"> an ACL entry </param> /// <returns> a new builder </returns> public static Builder NewBuilder(AclEntry entry) { return(new Builder(entry.Type_Renamed, entry.Who, entry.Perms, entry.Flags_Renamed)); }