/** * Removes all the attributes from this attribute set. * * @see <a href="../../../../api/com/novell/ldap/LDAPAttributeSet.html#clear()"> com.novell.ldap.LDAPAttributeSet.clear()</a> */ public void clear() { attrSet.clear(); return; }
/** * Constructs an empty set of attributes. */ public LDAPAttributeSet() { super(); this.clear(); }
/** * Returns a deep copy of this attribute set. * * @return A deep copy of this attribute set. */ public Object clone() { try { Object newObj = super.clone(); ((LDAPAttributeSet)newObj).clear(); Iterator i = this.iterator(); while (i.hasNext()){ ((LDAPAttributeSet)newObj).add( ((LDAPAttribute)i.next()).clone()); } return newObj; } catch( CloneNotSupportedException ce) { throw new RuntimeException("Internal error, cannot create clone"); } }