From: David ‘Bombe’ Roden Date: Mon, 26 May 2008 18:54:38 +0000 (+0200) Subject: add even more methods X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=299e8850c53af29ce6c122169c76f10e89dd67bd;p=jSite2.git add even more methods --- diff --git a/src/net/pterodactylus/util/data/Node.java b/src/net/pterodactylus/util/data/Node.java index 3ba6004..37588b5 100644 --- a/src/net/pterodactylus/util/data/Node.java +++ b/src/net/pterodactylus/util/data/Node.java @@ -110,6 +110,11 @@ public interface Node extends Iterable> { public void removeChild(int childIndex); /** + * Removes all children from this node. + */ + public void removeAllChildren(); + + /** * {@inheritDoc} */ public Iterator> iterator(); diff --git a/src/net/pterodactylus/util/data/NodeImpl.java b/src/net/pterodactylus/util/data/NodeImpl.java index 2d57876..283a663 100644 --- a/src/net/pterodactylus/util/data/NodeImpl.java +++ b/src/net/pterodactylus/util/data/NodeImpl.java @@ -148,6 +148,13 @@ class NodeImpl implements Node { /** * {@inheritDoc} */ + public void removeAllChildren() { + children.clear(); + } + + /** + * {@inheritDoc} + */ public Iterator> iterator() { return children.iterator(); }