Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] removeChild returns what?

xom-interest AT

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Elliotte Rusty Harold <elharo AT>
  • To: xom-interest <xom-interest AT>
  • Subject: Re: [XOM-interest] removeChild returns what?
  • Date: Sun, 4 May 2003 10:11:38 -0400

At 9:18 AM -0400 5/4/03, Elliotte Rusty Harold wrote:

public Node removeChild(int position)
public Node removeChild(Node child)

One more point. Making removeChild(int) return the removed node is consistent with the remove(int) methods in java.util.List. However, the remove(Object) method in that list returns a boolean, an idiom I just hate. Methods that fail should throw an exception, not return false.
Elliotte Rusty Harold
elharo AT
Processing XML with Java (Addison-Wesley, 2002)

Archive powered by MHonArc 2.6.24.

Top of Page