Skip to content
Browse files

Added a few methods to ListHolder, for conveniance, you know.

  • Loading branch information...
1 parent c19bdf5 commit 224d56a6e0d877c926d5c123b0b11025f6435cc6 @inca committed Apr 20, 2012
Showing with 6 additions and 2 deletions.
  1. +6 −2 circumflex-xml/src/main/scala/holder.scala
View
8 circumflex-xml/src/main/scala/holder.scala
@@ -159,10 +159,14 @@ trait ListHolder[T <: ElemHolder]
val children = new ListBuffer[T]
- def add(child: T): this.type = {
+ def add(child: T) {
child.parent = Some(this)
children += child
- this
+ }
+
+ def setChildren(children: Seq[T]) {
+ this.children.clear()
+ this.children ++= children
}
def read: String => T

0 comments on commit 224d56a

Please sign in to comment.
Something went wrong with that request. Please try again.