[jdom-interest] removeAttribute() patch for Element.java
Jools
jools at jools.org
Wed Aug 29 12:46:31 PDT 2001
Hi
Attached is a patch for Element.java which will add the following
new method to Element.java;
public boolean removeAttribute(Attribute attribute);
--Jools
-------------- next part --------------
Index: Element.java
===================================================================
RCS file: /home/cvspublic/jdom/src/java/org/jdom/Element.java,v
retrieving revision 1.98
diff -r1.98 Element.java
1751a1752,1768
> * This removes the supplied Attribute should it exist.
> * </p>
> *
> * @param attribute Reference to the attribute to be removed.
> * @return whether the attribute was removed
> */
> public boolean removeAttribute(Attribute attribute) {
> if (attributes == null ||
> (attribute == null) || (attribute.getParent() != this)) {
> return false;
> }
>
> return attributes.remove(attribute);
> }
>
> /**
> * <p>
More information about the jdom-interest
mailing list