com.codecommit.antixml

Group

class Group [+A <: Node] extends IndexedSeq[A] with IndexedSeqLike[A, Group[A]] with Selectable[A]

Represents a collection of arbitrary nodes (Node)). Note that this collection need not have a single root parent element. Thus, a valid Group could be as follows:

Group(EntityRef("quot"), Text("Daniel is "), Elem(None, "em", Attributes(), Map(), Group(Text("delusional!"))), EntityRef("quot"))

This would correspond to the following XML fragment (note: not actually well-formed XML, since it is lacking a single root element):

&quot;Daniel is <em>delusional!</em>&quot;

Note that unlike scala.xml, Group is not a special type of Node! This design decision has a very profound impact on the framework as a whole. In general, the result is an API which is more consistent and more predictable than it otherwise would have been. However, it also resulted in some unfortunate sacrifices: specifically, full XPath semantics. The exact semantics of the \ and \\ operators are defined in their respective scaladocs.

Group is parameterized based on the type of Node it contains. In the general case (such as the one illustrated above), this will be exactly Node. However, there are some very common cases wherein a Group may have a more specific type than just Node. For example:

val ns: Group[Node] = ...
val results = ns \ "name"

In this example, results will have type Group[Elem]. This is because the selector employed ("name") can only produce results of type Elem. This mechanism forms the basis for the typed selectors mechanism, which is extremely powerful and serves to eliminate a great deal of boiler-plate casting when traversing XML hierarchies.

In the general case, Group is backed by an instance of scala.collection.immutable.Vector. This implementation detail is significant as it implies two things. First, the implementation of Group is truly immutable, meaning that there are no tricky concurrency semantics to worry about. Second, unlike scala.xml (which backs its sequences by either List or ArrayBuffer, depending on phase of the moon), it is possible to perform efficient random-access and updates across the entire Group. Random access is implemented by the apply method, while random "updates" are implemented by the updated method. Fast prepend and append operations are also available.

Beyond this, all standard collection operations are available on Group (e.g. flatMap, exists, collect, slice, etc). The appropriate incantations have been spoken to allow these methods to return the correct type. Thus, if you map over a Group and your function returns something which extends Node, the result will be a Group. If your function returns something which does not extend Node (e.g. Int), then the result will be something else (probably a generic IndexedSeq backed by Vector). Group itself extends scala.collection.immutable.IndexedSeq and thus can be used in situations which require this abstraction.

Source
Group.scala
Linear Supertypes
Selectable[A], IndexedSeq[A], IndexedSeq[A], IndexedSeqLike[A, Group[A]], Seq[A], Seq[A], SeqLike[A, Group[A]], GenSeq[A], GenSeqLike[A, Group[A]], PartialFunction[Int, A], (Int) ⇒ A, Iterable[A], Iterable[A], IterableLike[A, Group[A]], Equals, GenIterable[A], GenIterableLike[A, Group[A]], Traversable[A], Immutable, Traversable[A], GenTraversable[A], GenericTraversableTemplate[A, IndexedSeq], TraversableLike[A, Group[A]], GenTraversableLike[A, Group[A]], Parallelizable[A, ParSeq[A]], TraversableOnce[A], GenTraversableOnce[A], FilterMonadic[A, Group[A]], HasNewBuilder[A, Group[A]], AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. Group
  2. Selectable
  3. IndexedSeq
  4. IndexedSeq
  5. IndexedSeqLike
  6. Seq
  7. Seq
  8. SeqLike
  9. GenSeq
  10. GenSeqLike
  11. PartialFunction
  12. Function1
  13. Iterable
  14. Iterable
  15. IterableLike
  16. Equals
  17. GenIterable
  18. GenIterableLike
  19. Traversable
  20. Immutable
  21. Traversable
  22. GenTraversable
  23. GenericTraversableTemplate
  24. TraversableLike
  25. GenTraversableLike
  26. Parallelizable
  27. TraversableOnce
  28. GenTraversableOnce
  29. FilterMonadic
  30. HasNewBuilder
  31. AnyRef
  32. Any
Visibility
  1. Public
  2. All

Type Members

  1. type Self = Group[A]

    Attributes
    protected
    Definition Classes
    TraversableLike

Value Members

  1. def != (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  2. def != (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  3. def ## (): Int

    Attributes
    final
    Definition Classes
    AnyRef → Any
  4. def ++ [B >: A <: Node] (that: Group[B]): Group[B]

    Efficient (and slightly tricky) overload of ++ on parameters which are specifically of type Group[_].

  5. def ++ [B >: A, That] (that: TraversableOnce[B])(implicit bf: CanBuildFrom[Group[A], B, That]): That

    Definition Classes
    TraversableLike
    Annotations
    @bridge()
  6. def ++ [B >: A, That] (that: GenTraversableOnce[B])(implicit bf: CanBuildFrom[Group[A], B, That]): That

    Definition Classes
    TraversableLike → GenTraversableLike
  7. def ++: [B >: A, That] (that: Traversable[B])(implicit bf: CanBuildFrom[Group[A], B, That]): That

    Definition Classes
    TraversableLike
  8. def ++: [B >: A, That] (that: TraversableOnce[B])(implicit bf: CanBuildFrom[Group[A], B, That]): That

    Definition Classes
    TraversableLike
  9. def +: [B >: A <: Node] (node: B): Group[B]

    Efficient (and slightly tricky) overload of +: on parameters which are specifically of type Node.

  10. def +: [B >: A, That] (elem: B)(implicit bf: CanBuildFrom[Group[A], B, That]): That

    Definition Classes
    SeqLike → GenSeqLike
  11. def /: [B] (z: B)(op: (B, A) ⇒ B): B

    Definition Classes
    TraversableOnce → GenTraversableOnce
  12. def /:\ [A1 >: A] (z: A1)(op: (A1, A1) ⇒ A1): A1

    Definition Classes
    GenTraversableOnce
  13. def :+ [B >: A <: Node] (node: B): Group[B]

    Efficient (and slightly tricky) overload of :+ on parameters which are specifically of type Node.

  14. def :+ [B >: A, That] (elem: B)(implicit bf: CanBuildFrom[Group[A], B, That]): That

    Definition Classes
    SeqLike → GenSeqLike
  15. def :\ [B] (z: B)(op: (A, B) ⇒ B): B

    Definition Classes
    TraversableOnce → GenTraversableOnce
  16. def == (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  17. def == (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  18. def \ (selector: Selector[Node]): Zipper[Node]

    [use case] Performs a shallow-select on the XML tree according to the specified selector function.

    [use case]

    Performs a shallow-select on the XML tree according to the specified selector function. Shallow selection is defined according to the following expression:

    Attributes
    abstract
    Definition Classes
    Selectable
  19. def \ [B, That] (selector: Selector[B])(implicit cbfwz: CanBuildFromWithZipper[Group[A], B, That]): That

    Performs a shallow-select on the XML tree according to the specified selector function.

    Performs a shallow-select on the XML tree according to the specified selector function. Shallow selection is defined according to the following expression:

    nodes flatMap {
      case Elem(_, _, children) => children collect selector
      case _ => Group()
    }
    

    In English, this means that a shallow selection works by first selecting only the Elem(s) at the top level and then filtering their children according to the selector. The results of these filtrations are concatenated together, producing a single flattened result.

    Very important: This is not the same as the XPath / operator! (nor does it strive to be) XPath is inconsistent in its selection semantics, varying them slightly depending on whether or not you are selecting from the top level or in the middle of a compound expression. As a result, it is categorically impossible to implement XPath in a combinatorial fashion. Rather than give up on combinators, we chose to give up on XPath. In practice, this "select child Elem(s), then filter their children" behavior tends to be the most useful variant of the XPath selection. The "missed" case here is applying a filter to the top-level set of nodes. This is currently not handled by the API (perhaps in future). For now, if you need this functionality, it's pretty easy to get it using the filter method.

    The results of this function will be a collection of some variety, but the exact type is determined by the selector itself. For example:

    val ns: Group[Node] = ...
    ns \ "name"
    ns \ *
    ns \ text
    

    The three selection expressions here produce very different results. The first will produce a collection of type Zipper[Elem], the second will produce Zipper[Node], while the third will produce scala.collection.Traversable[scala.String]. This reflects the fact that the selector produced (by implicit conversion) from a String will only filter for nodes of type Elem. However, the * selector will filter for all nodes (as the wildcard symbol would suggest) and thus it must return a collection containing the fully-generic Node. Finally, the text selector specifically pulls out the textual contents of nodes, and thus its results will not be nodes at all, but raw String(s).

    Whenever supported by the resulting collection type, the selection operation will preserve a "backtrace", or an "undo log" of sorts. This backtrace is known as a zipper context. This context makes it possible to operate on the collection resulting from performing a selection, then unselect to rebuild the original collection around it (modulo the changes made). This provides a very clean and powerful way of drilling down into an XML tree, making some changes and then realizing those changes within the context of the full tree. In a sense, it solves the major inconvenience associated with immutable tree structures: the need to manually rebuild the entire ancestry of the tree after making a change somewhere within.

    Definition Classes
    Selectable
    See also

    Zipper

  20. def \\ (selector: Selector[Node]): Zipper[Node]

    [use case] Performs a deep-select on the XML tree according to the specified selector function.

    [use case]

    Performs a deep-select on the XML tree according to the specified selector function. Deep selection is defined according to the following recursion:

    Attributes
    abstract
    Definition Classes
    Selectable
  21. def \\ [B, That] (selector: Selector[B])(implicit cbfwz: CanBuildFromWithZipper[Group[A], B, That]): That

    Performs a deep-select on the XML tree according to the specified selector function.

    Performs a deep-select on the XML tree according to the specified selector function. Deep selection is defined according to the following recursion:

    def deep(g: Group[Node]):That =
      g flatMap {n => Group(n).collect(selector) ++ deep(n.children)}
    
    nodes flatMap {n => deep(n.children)}
    

    In English, this means that deep selection is defined simply as a depth-first search through the tree, all the way from the root down to the leaves. Note that the recursion does not short circuit when a result is found. Thus, if a parent node matches the selector as well as one of its children, then both the parent and the child will be returned, with the parent preceeding the child in the results.

    Just as with shallow selection, the very outermost level of the group is not considered in the selection. Thus, deep selection is not exactly the same as the XPath // operator, since // will consider the outermost level, while Anti-XML's deep selection \\ will not.

    Definition Classes
    Selectable
  22. def \\! (selector: Selector[Node]): Zipper[Node]

    [use case] Performs a short-circuiting deep-select on the XML tree according to the specified selector.

    [use case]

    Performs a short-circuiting deep-select on the XML tree according to the specified selector. Short-circuit deep selection is defined according to the following recursion:

    Attributes
    abstract
    Definition Classes
    Selectable
  23. def \\! [B, That] (selector: Selector[B])(implicit cbfwz: CanBuildFromWithZipper[com.codecommit.antixml.Group[_ <: com.codecommit.antixml.Node], B, That]): That

    Performs a short-circuiting deep-select on the XML tree according to the specified selector.

    Performs a short-circuiting deep-select on the XML tree according to the specified selector. Short-circuit deep selection is defined according to the following recursion:

    def deep(g: Group[Node]):That =
      g flatMap {n =>
        if (selector.isDefinedAt(n)) Group(n).collect(selector)
        else deep(n.children)
      }
    
    nodes flatMap {n => deep(n.children)}
    

    Like \\, this performs a depth-first search through the tree. However, any time the selector matches a node, it's children are skipped over rather than being searched. Thus, the result is guaranteed to never contain both a node and one of its descendants.

    Just as with shallow selection, the very outermost level of the group is not considered in the selection.

    Definition Classes
    Selectable
  24. def addString (b: StringBuilder): StringBuilder

    Definition Classes
    TraversableOnce
  25. def addString (b: StringBuilder, sep: String): StringBuilder

    Definition Classes
    TraversableOnce
  26. def addString (b: StringBuilder, start: String, sep: String, end: String): StringBuilder

    Definition Classes
    TraversableOnce
  27. def aggregate [B] (z: B)(seqop: (B, A) ⇒ B, combop: (B, B) ⇒ B): B

    Definition Classes
    TraversableOnce → GenTraversableOnce
  28. def andThen [C] (k: (A) ⇒ C): PartialFunction[Int, C]

    Definition Classes
    PartialFunction → Function1
  29. def apply (i: Int): A

    Definition Classes
    Group → SeqLike → GenSeqLike → Function1
  30. def asInstanceOf [T0] : T0

    Attributes
    final
    Definition Classes
    Any
  31. def canEqual (that: Any): Boolean

    Definition Classes
    IterableLike → Equals
  32. def canonicalize : Group[A]

    Merges adjacent Text as well as adjacent CDATA nodes to produce a Group which represents an identical XML fragment but with a minimized structure.

    Merges adjacent Text as well as adjacent CDATA nodes to produce a Group which represents an identical XML fragment but with a minimized structure. Slightly more formally, for any XML fragment with n characters of textual data, there are 2n possible ways of representing that fragment as a Group. All of these representations are semantically distinct (i.e. structurally different in memory) but logically equivalent in that they will all generate the same XML fragment if serialized. Of these 2n distinct representations, there will be exactly one representation which is minimal, in that the smallest possible number of Text and CDATA nodes are used to represent the textual data. This form may be considered "canonical". This method converts an arbitrary Group into its canonical form, a logically equivalent Group which represents the same XML fragment in its structurally minimized form.

    This method is perhaps best explained by an example:

    val xml = Group(Text("Daniel "), Text("Spiewak"))
    xml.canonicalize    // => Group(Text("Daniel Spiewak"))
    

    The Group resulting from the canonicalize invocation will produce exactly the same result as would xml were we to invoke the toString method on each of them. However, the canonicalized result has only one text node for the entire character block, while xml (the original Group) has two.

    This is actually a very common gotcha in scala.xml. The issue comes up most frequently in the area of equality. As you can see in the example above, xml clearly will not be equivalent (according to the equals method) to xml.canonicalize. However, it is very natural to assume that these two structures are in fact equal due to their logical equivalence in that they represent the same textual XML fragment. Oftentimes, people will get around this issue in scala.xml by converting all NodeSeq(s) into strings prior to comparison. In Anti-XML, all that is necessary to handle potential semantic divergence in cases of logical equality is to simply invoke the canonicalize method on each of the two equality operands.

  33. def clone (): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  34. def collect [B, That] (pf: PartialFunction[A, B])(implicit bf: CanBuildFrom[Group[A], B, That]): That

    Definition Classes
    TraversableLike → GenTraversableLike
  35. def collectFirst [B] (pf: PartialFunction[A, B]): Option[B]

    Definition Classes
    TraversableOnce
  36. def combinations (n: Int): Iterator[Group[A]]

    Definition Classes
    SeqLike
  37. def companion : GenericCompanion[IndexedSeq]

    Definition Classes
    IndexedSeq → IndexedSeq → Seq → Seq → GenSeq → Iterable → Iterable → GenIterable → Traversable → Traversable → GenTraversable → GenericTraversableTemplate
  38. def compose [A] (g: (A) ⇒ Int): (A) ⇒ A

    Definition Classes
    Function1
  39. def contains (elem: Any): Boolean

    Definition Classes
    SeqLike
  40. def containsSlice [B] (that: Seq[B]): Boolean

    Definition Classes
    SeqLike
    Annotations
    @bridge()
  41. def containsSlice [B] (that: GenSeq[B]): Boolean

    Definition Classes
    SeqLike
  42. def copyToArray [B >: A] (xs: Array[B], start: Int, len: Int): Unit

    Definition Classes
    IterableLike → TraversableLike → TraversableOnce → GenTraversableOnce
  43. def copyToArray [B >: A] (xs: Array[B]): Unit

    Definition Classes
    TraversableOnce → GenTraversableOnce
  44. def copyToArray [B >: A] (xs: Array[B], start: Int): Unit

    Definition Classes
    TraversableOnce → GenTraversableOnce
  45. def copyToBuffer [B >: A] (dest: Buffer[B]): Unit

    Definition Classes
    TraversableOnce
  46. def corresponds [B] (that: Seq[B])(p: (A, B) ⇒ Boolean): Boolean

    Definition Classes
    SeqLike
    Annotations
    @bridge()
  47. def corresponds [B] (that: GenSeq[B])(p: (A, B) ⇒ Boolean): Boolean

    Definition Classes
    SeqLike → GenSeqLike
  48. def count (p: (A) ⇒ Boolean): Int

    Definition Classes
    TraversableOnce → GenTraversableOnce
  49. def diff [B >: A] (that: Seq[B]): Group[A]

    Definition Classes
    SeqLike
    Annotations
    @bridge()
  50. def diff [B >: A] (that: GenSeq[B]): Group[A]

    Definition Classes
    SeqLike → GenSeqLike
  51. def distinct : Group[A]

    Definition Classes
    SeqLike → GenSeqLike
  52. def drop (n: Int): Group[A]

    Definition Classes
    Group → IterableLike → TraversableLike → GenTraversableLike
  53. def dropRight (n: Int): Group[A]

    Definition Classes
    Group → IterableLike
  54. def dropWhile (p: (A) ⇒ Boolean): Group[A]

    Definition Classes
    TraversableLike → GenTraversableLike
  55. def endsWith [B] (that: Seq[B]): Boolean

    Definition Classes
    SeqLike
    Annotations
    @bridge()
  56. def endsWith [B] (that: GenSeq[B]): Boolean

    Definition Classes
    SeqLike → GenSeqLike
  57. def eq (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  58. def equals (that: Any): Boolean

    Definition Classes
    GenSeqLike → Equals → AnyRef → Any
  59. def exists (p: (A) ⇒ Boolean): Boolean

    Definition Classes
    IterableLike → TraversableLike → TraversableOnce → GenTraversableOnce
  60. def filter (p: (A) ⇒ Boolean): Group[A]

    Definition Classes
    TraversableLike → GenTraversableLike
  61. def filterNot (p: (A) ⇒ Boolean): Group[A]

    Definition Classes
    TraversableLike → GenTraversableLike
  62. def finalize (): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  63. def find (p: (A) ⇒ Boolean): Option[A]

    Definition Classes
    IterableLike → TraversableLike → TraversableOnce → GenTraversableOnce
  64. def flatMap [B, That] (f: (A) ⇒ GenTraversableOnce[B])(implicit bf: CanBuildFrom[Group[A], B, That]): That

    Definition Classes
    TraversableLike → GenTraversableLike → FilterMonadic
  65. def flatten [B] (implicit asTraversable: (A) ⇒ TraversableOnce[B]): Traversable[B]

    Definition Classes
    Traversable → GenericTraversableTemplate
    Annotations
    @bridge()
  66. def fold [A1 >: A] (z: A1)(op: (A1, A1) ⇒ A1): A1

    Definition Classes
    TraversableOnce → GenTraversableOnce
  67. def foldLeft [B] (z: B)(op: (B, A) ⇒ B): B

    Definition Classes
    TraversableOnce → GenTraversableOnce
  68. def foldRight [B] (z: B)(op: (A, B) ⇒ B): B

    Definition Classes
    IterableLike → TraversableOnce → GenTraversableOnce
  69. def forall (p: (A) ⇒ Boolean): Boolean

    Definition Classes
    IterableLike → TraversableLike → TraversableOnce → GenTraversableOnce
  70. def foreach [U] (f: (A) ⇒ U): Unit

    Definition Classes
    IterableLike → TraversableLike → GenTraversableLike → TraversableOnce → GenTraversableOnce → FilterMonadic
  71. def genericBuilder [B] : Builder[B, IndexedSeq[B]]

    Definition Classes
    GenericTraversableTemplate
  72. def getClass (): java.lang.Class[_]

    Attributes
    final
    Definition Classes
    AnyRef → Any
  73. def groupBy [K] (f: (A) ⇒ K): Map[K, Group[A]]

    Definition Classes
    TraversableLike → GenTraversableLike
  74. def grouped (size: Int): Iterator[Group[A]]

    Definition Classes
    IterableLike
  75. def hasDefiniteSize : Boolean

    Definition Classes
    TraversableLike → TraversableOnce → GenTraversableOnce
  76. def hashCode (): Int

    Definition Classes
    GenSeqLike → AnyRef → Any
  77. def head : A

    Definition Classes
    Group → IterableLike → GenIterableLike → GenericTraversableTemplate → TraversableLike → GenTraversableLike
  78. def headOption : Option[A]

    Definition Classes
    TraversableLike
  79. def indexOf [B >: A] (elem: B, from: Int): Int

    Definition Classes
    GenSeqLike
  80. def indexOf [B >: A] (elem: B): Int

    Definition Classes
    GenSeqLike
  81. def indexOfSlice [B >: A] (that: Seq[B], from: Int): Int

    Definition Classes
    SeqLike
    Annotations
    @bridge()
  82. def indexOfSlice [B >: A] (that: GenSeq[B], from: Int): Int

    Definition Classes
    SeqLike
  83. def indexOfSlice [B >: A] (that: Seq[B]): Int

    Definition Classes
    SeqLike
    Annotations
    @bridge()
  84. def indexOfSlice [B >: A] (that: GenSeq[B]): Int

    Definition Classes
    SeqLike
  85. def indexWhere (p: (A) ⇒ Boolean, from: Int): Int

    Definition Classes
    SeqLike → GenSeqLike
  86. def indexWhere (p: (A) ⇒ Boolean): Int

    Definition Classes
    GenSeqLike
  87. def indices : Range

    Definition Classes
    SeqLike
  88. def init : Group[A]

    Definition Classes
    Group → TraversableLike
  89. def inits : Iterator[Group[A]]

    Definition Classes
    TraversableLike
  90. def intersect [B >: A] (that: Seq[B]): Group[A]

    Definition Classes
    SeqLike
    Annotations
    @bridge()
  91. def intersect [B >: A] (that: GenSeq[B]): Group[A]

    Definition Classes
    SeqLike → GenSeqLike
  92. def isDefinedAt (idx: Int): Boolean

    Definition Classes
    GenSeqLike
  93. def isEmpty : Boolean

    Definition Classes
    IterableLike → GenIterableLike → TraversableLike → TraversableOnce → GenTraversableOnce
  94. def isInstanceOf [T0] : Boolean

    Attributes
    final
    Definition Classes
    Any
  95. def isTraversableAgain : Boolean

    Attributes
    final
    Definition Classes
    GenTraversableLike → GenTraversableOnce
  96. def iterator : Iterator[A]

    Definition Classes
    Group → IndexedSeqLike → IterableLike → GenIterableLike
  97. def last : A

    Definition Classes
    Group → TraversableLike
  98. def lastIndexOf [B >: A] (elem: B, end: Int): Int

    Definition Classes
    GenSeqLike
  99. def lastIndexOf [B >: A] (elem: B): Int

    Definition Classes
    GenSeqLike
  100. def lastIndexOfSlice [B >: A] (that: Seq[B], end: Int): Int

    Definition Classes
    SeqLike
    Annotations
    @bridge()
  101. def lastIndexOfSlice [B >: A] (that: GenSeq[B], end: Int): Int

    Definition Classes
    SeqLike
  102. def lastIndexOfSlice [B >: A] (that: Seq[B]): Int

    Definition Classes
    SeqLike
    Annotations
    @bridge()
  103. def lastIndexOfSlice [B >: A] (that: GenSeq[B]): Int

    Definition Classes
    SeqLike
  104. def lastIndexWhere (p: (A) ⇒ Boolean, end: Int): Int

    Definition Classes
    SeqLike → GenSeqLike
  105. def lastIndexWhere (p: (A) ⇒ Boolean): Int

    Definition Classes
    GenSeqLike
  106. def lastOption : Option[A]

    Definition Classes
    TraversableLike
  107. def length : Int

    Definition Classes
    Group → SeqLike → GenSeqLike
  108. def lengthCompare (len: Int): Int

    Definition Classes
    Group → SeqLike
  109. def lift : (Int) ⇒ Option[A]

    Definition Classes
    PartialFunction
  110. def map [B, That] (f: (A) ⇒ B)(implicit bf: CanBuildFrom[Group[A], B, That]): That

    Definition Classes
    TraversableLike → GenTraversableLike → FilterMonadic
  111. def matches (elementName: String): Boolean

    If true this group may contain an element with the given name as one of its children (recursively).

  112. def max [B >: A] (implicit cmp: Ordering[B]): A

    Definition Classes
    TraversableOnce → GenTraversableOnce
  113. def maxBy [B] (f: (A) ⇒ B)(implicit cmp: Ordering[B]): A

    Definition Classes
    TraversableOnce → GenTraversableOnce
  114. def min [B >: A] (implicit cmp: Ordering[B]): A

    Definition Classes
    TraversableOnce → GenTraversableOnce
  115. def minBy [B] (f: (A) ⇒ B)(implicit cmp: Ordering[B]): A

    Definition Classes
    TraversableOnce → GenTraversableOnce
  116. def mkString : String

    Definition Classes
    TraversableOnce → GenTraversableOnce
  117. def mkString (sep: String): String

    Definition Classes
    TraversableOnce → GenTraversableOnce
  118. def mkString (start: String, sep: String, end: String): String

    Definition Classes
    TraversableOnce → GenTraversableOnce
  119. def ne (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  120. def newBuilder : Builder[A, Group[A]]

    Attributes
    protected[this]
    Definition Classes
    Group → GenericTraversableTemplate → TraversableLike → HasNewBuilder
  121. def nonEmpty : Boolean

    Definition Classes
    TraversableOnce → GenTraversableOnce
  122. def notify (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  123. def notifyAll (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  124. def orElse [A1 <: Int, B1 >: A] (that: PartialFunction[A1, B1]): PartialFunction[A1, B1]

    Definition Classes
    PartialFunction
  125. def padTo [B >: A, That] (len: Int, elem: B)(implicit bf: CanBuildFrom[Group[A], B, That]): That

    Definition Classes
    SeqLike → GenSeqLike
  126. def par : ParSeq[A]

    Definition Classes
    Parallelizable
  127. def parCombiner : Combiner[A, ParSeq[A]]

    Attributes
    protected[this]
    Definition Classes
    Seq → SeqLike → Iterable → TraversableLike → Parallelizable
  128. def partition (p: (A) ⇒ Boolean): (Group[A], Group[A])

    Definition Classes
    TraversableLike → GenTraversableLike
  129. def patch [B >: A, That] (from: Int, patch: Seq[B], replaced: Int)(implicit bf: CanBuildFrom[Group[A], B, That]): That

    Definition Classes
    SeqLike
    Annotations
    @bridge()
  130. def patch [B >: A, That] (from: Int, patch: GenSeq[B], replaced: Int)(implicit bf: CanBuildFrom[Group[A], B, That]): That

    Definition Classes
    SeqLike → GenSeqLike
  131. def permutations : Iterator[Group[A]]

    Definition Classes
    SeqLike
  132. def prefixLength (p: (A) ⇒ Boolean): Int

    Definition Classes
    GenSeqLike
  133. def product [B >: A] (implicit num: Numeric[B]): B

    Definition Classes
    TraversableOnce → GenTraversableOnce
  134. def reduce [A1 >: A] (op: (A1, A1) ⇒ A1): A1

    Definition Classes
    TraversableOnce → GenTraversableOnce
  135. def reduceLeft [B >: A] (op: (B, A) ⇒ B): B

    Definition Classes
    TraversableOnce
  136. def reduceLeftOption [B >: A] (op: (B, A) ⇒ B): Option[B]

    Definition Classes
    TraversableOnce → GenTraversableOnce
  137. def reduceOption [A1 >: A] (op: (A1, A1) ⇒ A1): Option[A1]

    Definition Classes
    TraversableOnce → GenTraversableOnce
  138. def reduceRight [B >: A] (op: (A, B) ⇒ B): B

    Definition Classes
    IterableLike → TraversableOnce → GenTraversableOnce
  139. def reduceRightOption [B >: A] (op: (A, B) ⇒ B): Option[B]

    Definition Classes
    TraversableOnce → GenTraversableOnce
  140. def repr : Group[A]

    Definition Classes
    TraversableLike → GenTraversableLike
  141. def reverse : Group[A]

    Definition Classes
    SeqLike → GenSeqLike
  142. def reverseIterator : Iterator[A]

    Definition Classes
    Group → SeqLike
  143. def reverseMap [B, That] (f: (A) ⇒ B)(implicit bf: CanBuildFrom[Group[A], B, That]): That

    Definition Classes
    SeqLike → GenSeqLike
  144. def reversed : List[A]

    Attributes
    protected[this]
    Definition Classes
    TraversableOnce
  145. def sameElements [B >: A] (that: Iterable[B]): Boolean

    Definition Classes
    IterableLike
    Annotations
    @bridge()
  146. def sameElements [B >: A] (that: GenIterable[B]): Boolean

    Definition Classes
    IterableLike → GenIterableLike
  147. def scan [B >: A, That] (z: B)(op: (B, B) ⇒ B)(implicit cbf: CanBuildFrom[Group[A], B, That]): That

    Definition Classes
    TraversableLike → GenTraversableLike
  148. def scanLeft [B, That] (z: B)(op: (B, A) ⇒ B)(implicit bf: CanBuildFrom[Group[A], B, That]): That

    Definition Classes
    TraversableLike → GenTraversableLike
  149. def scanRight [B, That] (z: B)(op: (A, B) ⇒ B)(implicit bf: CanBuildFrom[Group[A], B, That]): That

    Definition Classes
    TraversableLike → GenTraversableLike
    Annotations
    @migration
    Migration

  150. def segmentLength (p: (A) ⇒ Boolean, from: Int): Int

    Definition Classes
    SeqLike → GenSeqLike
  151. def select (selector: Selector[Node]): Zipper[Node]

    [use case] Performs a selection on the top-level nodes of this group.

    [use case]

    Performs a selection on the top-level nodes of this group. The nodes returned by this method are exactly the same as the nodes returned by:

    Attributes
    abstract
    Definition Classes
    Selectable
  152. def select [B, That] (selector: Selector[B])(implicit cbfwz: CanBuildFromWithZipper[com.codecommit.antixml.Group[_ <: com.codecommit.antixml.Node], B, That]): That

    Performs a selection on the top-level nodes of this group.

    Performs a selection on the top-level nodes of this group. The nodes returned by this method are exactly the same as the nodes returned by:

    nodes.collect(selector)
    

    However, this method differs from collect in that it can return a Zipper with full unselect functionality. Thus, it is possible to select a subset of a group, operate on that subset, and then call unselect to pull those operations back to the original group.

    Definition Classes
    Selectable
  153. def seq : Seq[A]

    Definition Classes
    Seq → Seq → GenSeq → Iterable → Iterable → GenIterable → Traversable → Traversable → GenTraversable → Parallelizable → TraversableOnce → GenTraversableOnce
  154. def size : Int

    Definition Classes
    SeqLike → GenTraversableLike → TraversableOnce → GenTraversableOnce
  155. def slice (from: Int, until: Int): Group[A]

    Definition Classes
    Group → IterableLike → TraversableLike → GenTraversableLike
  156. def sliding [B >: A] (size: Int, step: Int): Iterator[Group[A]]

    Definition Classes
    IterableLike
  157. def sliding [B >: A] (size: Int): Iterator[Group[A]]

    Definition Classes
    IterableLike
  158. def sortBy [B] (f: (A) ⇒ B)(implicit ord: Ordering[B]): Group[A]

    Definition Classes
    SeqLike
  159. def sortWith (lt: (A, A) ⇒ Boolean): Group[A]

    Definition Classes
    SeqLike
  160. def sorted [B >: A] (implicit ord: Ordering[B]): Group[A]

    Definition Classes
    SeqLike
  161. def span (p: (A) ⇒ Boolean): (Group[A], Group[A])

    Definition Classes
    TraversableLike → GenTraversableLike
  162. def splitAt (n: Int): (Group[A], Group[A])

    Definition Classes
    Group → TraversableLike → GenTraversableLike
  163. def startsWith [B] (that: Seq[B], offset: Int): Boolean

    Definition Classes
    SeqLike
    Annotations
    @bridge()
  164. def startsWith [B] (that: GenSeq[B], offset: Int): Boolean

    Definition Classes
    SeqLike → GenSeqLike
  165. def startsWith [B] (that: Seq[B]): Boolean

    Definition Classes
    GenSeqLike
    Annotations
    @bridge()
  166. def startsWith [B] (that: GenSeq[B]): Boolean

    Definition Classes
    GenSeqLike
  167. def stringPrefix : String

    Definition Classes
    TraversableLike → GenTraversableLike
  168. def sum [B >: A] (implicit num: Numeric[B]): B

    Definition Classes
    TraversableOnce → GenTraversableOnce
  169. def synchronized [T0] (arg0: ⇒ T0): T0

    Attributes
    final
    Definition Classes
    AnyRef
  170. def tail : Group[A]

    Definition Classes
    Group → TraversableLike → GenTraversableLike
  171. def tails : Iterator[Group[A]]

    Definition Classes
    TraversableLike
  172. def take (n: Int): Group[A]

    Definition Classes
    Group → IterableLike → TraversableLike → GenTraversableLike
  173. def takeRight (n: Int): Group[A]

    Definition Classes
    Group → IterableLike
  174. def takeWhile (p: (A) ⇒ Boolean): Group[A]

    Definition Classes
    IterableLike → TraversableLike → GenTraversableLike
  175. def thisCollection : IndexedSeq[A]

    Attributes
    protected[this]
    Definition Classes
    IndexedSeqLike → SeqLike → IterableLike → TraversableLike
  176. def toArray [B >: A] (implicit arg0: ClassManifest[B]): Array[B]

    Definition Classes
    TraversableOnce → GenTraversableOnce
  177. def toBuffer [A1 >: A] : Buffer[A1]

    Definition Classes
    IndexedSeqLike → TraversableOnce → GenTraversableOnce
  178. def toCollection (repr: Group[A]): IndexedSeq[A]

    Attributes
    protected[this]
    Definition Classes
    IndexedSeqLike → SeqLike → IterableLike → TraversableLike
  179. def toGroup : Group[A]

    Definition Classes
    GroupSelectable
  180. def toIndexedSeq [B >: A] : IndexedSeq[B]

    Definition Classes
    IndexedSeq → TraversableOnce → GenTraversableOnce
  181. def toIterable : Iterable[A]

    Definition Classes
    IterableLike → TraversableOnce → GenTraversableOnce
  182. def toIterator : Iterator[A]

    Definition Classes
    TraversableLike → GenTraversableOnce
  183. def toList : List[A]

    Definition Classes
    TraversableOnce → GenTraversableOnce
  184. def toMap [T, U] (implicit ev: <:<[A, (T, U)]): Map[T, U]

    Definition Classes
    TraversableOnce → GenTraversableOnce
  185. def toSeq : Seq[A]

    Definition Classes
    Seq → SeqLike → GenSeqLike → TraversableOnce → GenTraversableOnce
  186. def toSet [B >: A] : Set[B]

    Definition Classes
    TraversableOnce → GenTraversableOnce
  187. def toStream : Stream[A]

    Definition Classes
    IterableLike → TraversableLike → GenTraversableOnce
  188. def toString (): String

    Serializes the nodes in this Group into their most compact XML representation and concatenates the result.

    Serializes the nodes in this Group into their most compact XML representation and concatenates the result. Note that the result of this method may not be well-formed XML, since well-formed XML is required to have only a single parent element (whereas a Group may contain multiple nodes at its top level).

    This is not a pretty-print. The resulting XML will not be formatted in any way. It will be precisely the XML fragment represented by this Group, no more and no less.

    returns

    The XML fragment represented by this Group in String form

    Definition Classes
    Group → SeqLike → Function1 → TraversableLike → AnyRef → Any
  189. def toTraversable : Traversable[A]

    Definition Classes
    TraversableLike → TraversableOnce → GenTraversableOnce
  190. def toVector : Vector[A]

    Produces a scala.collection.immutable.Vector which contains all of the nodes in this Group.

    Produces a scala.collection.immutable.Vector which contains all of the nodes in this Group. This function is guaranteed to run in constant time.

  191. def toZipper : Zipper[A]

    Definition Classes
    GroupSelectable
  192. def transpose [B] (implicit asTraversable: (A) ⇒ TraversableOnce[B]): Traversable[Traversable[B]]

    Definition Classes
    Traversable → GenericTraversableTemplate
    Annotations
    @bridge()
  193. def union [B >: A, That] (that: GenSeq[B])(implicit bf: CanBuildFrom[Group[A], B, That]): That

    Definition Classes
    SeqLike → GenSeqLike
  194. def union [B >: A, That] (that: Seq[B])(implicit bf: CanBuildFrom[Group[A], B, That]): That

    Definition Classes
    GenSeqLike
    Annotations
    @bridge()
  195. def unzip [A1, A2] (implicit asPair: (A) ⇒ (A1, A2)): (IndexedSeq[A1], IndexedSeq[A2])

    Definition Classes
    GenericTraversableTemplate
  196. def unzip3 [A1, A2, A3] (implicit asTriple: (A) ⇒ (A1, A2, A3)): (IndexedSeq[A1], IndexedSeq[A2], IndexedSeq[A3])

    Definition Classes
    GenericTraversableTemplate
  197. def updated [B >: A <: Node] (index: Int, node: B): Group[B]

    Efficient (and slightly tricky) overload of updated on parameters which are specifically of type Node.

  198. def updated [B >: A, That] (index: Int, elem: B)(implicit bf: CanBuildFrom[Group[A], B, That]): That

    Definition Classes
    SeqLike → GenSeqLike
  199. def view (from: Int, until: Int): SeqView[A, Group[A]]

    Definition Classes
    SeqLike → IterableLike → TraversableLike
  200. def view : SeqView[A, Group[A]]

    Definition Classes
    SeqLike → IterableLike → TraversableLike
  201. def wait (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  202. def wait (arg0: Long, arg1: Int): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  203. def wait (arg0: Long): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  204. def withFilter (p: (A) ⇒ Boolean): FilterMonadic[A, Group[A]]

    Definition Classes
    TraversableLike → FilterMonadic
  205. def zip [A1 >: A, B, That] (that: Iterable[B])(implicit bf: CanBuildFrom[Group[A], (A1, B), That]): That

    Definition Classes
    IterableLike
    Annotations
    @bridge()
  206. def zip [A1 >: A, B, That] (that: GenIterable[B])(implicit bf: CanBuildFrom[Group[A], (A1, B), That]): That

    Definition Classes
    IterableLike → GenIterableLike
  207. def zipAll [B, A1 >: A, That] (that: Iterable[B], thisElem: A1, thatElem: B)(implicit bf: CanBuildFrom[Group[A], (A1, B), That]): That

    Definition Classes
    IterableLike
    Annotations
    @bridge()
  208. def zipAll [B, A1 >: A, That] (that: GenIterable[B], thisElem: A1, thatElem: B)(implicit bf: CanBuildFrom[Group[A], (A1, B), That]): That

    Definition Classes
    IterableLike → GenIterableLike
  209. def zipWithIndex [A1 >: A, That] (implicit bf: CanBuildFrom[Group[A], (A1, Int), That]): That

    Definition Classes
    IterableLike → GenIterableLike

Deprecated Value Members

  1. def elements : Iterator[A]

    Definition Classes
    IterableLike
    Annotations
    @deprecated
    Deprecated

    use iterator' instead

  2. def equalsWith [B] (that: Seq[B])(f: (A, B) ⇒ Boolean): Boolean

    Definition Classes
    SeqLike
    Annotations
    @deprecated
    Deprecated

    use corresponds instead

  3. def findIndexOf (p: (A) ⇒ Boolean): Int

    Definition Classes
    SeqLike
    Annotations
    @deprecated
    Deprecated

    Use indexWhere(p) instead.

  4. def findLastIndexOf (p: (A) ⇒ Boolean): Int

    Definition Classes
    SeqLike
    Annotations
    @deprecated
    Deprecated

    use lastIndexWhere instead

  5. def first : A

    Definition Classes
    IterableLike
    Annotations
    @deprecated
    Deprecated

    use head' instead

  6. def firstOption : Option[A]

    Definition Classes
    IterableLike
    Annotations
    @deprecated
    Deprecated

    use headOption' instead

  7. def projection : SeqView[A, Group[A]]

    Definition Classes
    SeqLike → IterableLike
    Annotations
    @deprecated
    Deprecated

    use view' instead

  8. def reversedElements : Iterator[A]

    Definition Classes
    SeqLike
    Annotations
    @deprecated
    Deprecated

    use reverseIterator' instead

Inherited from Selectable[A]

Inherited from IndexedSeq[A]

Inherited from IndexedSeq[A]

Inherited from IndexedSeqLike[A, Group[A]]

Inherited from Seq[A]

Inherited from Seq[A]

Inherited from SeqLike[A, Group[A]]

Inherited from GenSeq[A]

Inherited from GenSeqLike[A, Group[A]]

Inherited from PartialFunction[Int, A]

Inherited from (Int) ⇒ A

Inherited from Iterable[A]

Inherited from Iterable[A]

Inherited from IterableLike[A, Group[A]]

Inherited from Equals

Inherited from GenIterable[A]

Inherited from GenIterableLike[A, Group[A]]

Inherited from Traversable[A]

Inherited from Immutable

Inherited from Traversable[A]

Inherited from GenTraversable[A]

Inherited from GenericTraversableTemplate[A, IndexedSeq]

Inherited from TraversableLike[A, Group[A]]

Inherited from GenTraversableLike[A, Group[A]]

Inherited from Parallelizable[A, ParSeq[A]]

Inherited from TraversableOnce[A]

Inherited from GenTraversableOnce[A]

Inherited from FilterMonadic[A, Group[A]]

Inherited from HasNewBuilder[A, Group[A]]

Inherited from AnyRef

Inherited from Any