/** * Delete the attribute named <code>name</code>. * * @param clearname The name of the attribute to delete. This can be an * attribute of any type, including containers. */ public final void delAttribute(String clearname) { _attr.remove(clearname); }
/** * Delete the attribute named <code>name</code>. * * @param name The name of the attribute to delete. This can be an * attribute of any type, including containers. */ public final void delAttribute(String name) { _attr.remove(name); }
/** * Delete the attribute named <code>name</code>. If the attribute has a * vector value, delete the <code>i</code>'th element of the vector. * * @param name The name of the attribute to delete. This can be an * attribute of any type, including containers. * @param i If the named attribute is a vector, and <code>i</code> is * non-negative, the <code>i</code>'th entry in the vector is deleted. * If <code>i</code> equals -1, the entire attribute is deleted. * @see AttributeTable#delAttribute(String) */ public final void delAttribute(String name, int i) throws DASException { if (i == -1) { // delete the whole attribute _attr.remove(name); } else { Attribute a = (Attribute) _attr.get(name); if (a != null) { if (a.isContainer()) { _attr.remove(name); // delete the entire container } else { a.deleteValueAt(i); } } } }
/** * Delete the attribute named <code>name</code>. If the attribute has a * vector value, delete the <code>i</code>'th element of the vector. * * @param clearname The name of the attribute to delete. This can be an * attribute of any type, including containers. * @param i If the named attribute is a vector, and <code>i</code> is * non-negative, the <code>i</code>'th entry in the vector is deleted. * If <code>i</code> equals -1, the entire attribute is deleted. * @see AttributeTable#delAttribute(String) */ public final void delAttribute(String clearname, int i) throws DASException { if (i == -1) { // delete the whole attribute _attr.remove(clearname); } else { Attribute a = (Attribute) _attr.get(clearname); if (a != null) { if (a.isContainer()) { _attr.remove(clearname); // delete the entire container } else { a.deleteValueAt(i); } } } }