Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: lincolnthree on Mar 16th, 2011  |  syntax: None  |  size: 0.88 KB  |  views: 83  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.  
  2.  
  3.    /**
  4.     * Remove all child nodes found at the given query.
  5.     *
  6.     * @return the {@link List} of removed children.
  7.     */
  8.    public List<Node> remove(String name)
  9.    {
  10.       List<Node> found = get(name);
  11.       for (Node child : found)
  12.       {
  13.          children.remove(child);
  14.       }
  15.       return found;
  16.    }
  17.  
  18.    /**
  19.     * Remove all child nodes found at the given {@link Query}.
  20.     *
  21.     * @return the {@link List} of removed children.
  22.     */
  23.    public List<Node> remove(Query query)
  24.    {
  25.       List<Node> found = get(query);
  26.       for (Node child : found)
  27.       {
  28.          children.remove(child);
  29.       }
  30.       return found;
  31.    }
  32.  
  33.    /**
  34.     * Remove the given child from this {@link Node}
  35.     *
  36.     * @return true if this node contained the given child
  37.     */
  38.    public boolean remove(Node child)
  39.    {
  40.       return children.remove(child);
  41.    }
clone this paste RAW Paste Data