lincolnthree

Untitled

Mar 16th, 2011
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment