A class supporting filtered operations.
[use case] Concatenates this immutable sequence with the elements of a traversable collection.
Concatenates this immutable sequence with the elements of a traversable collection.
[use case] Prepends an element to this immutable sequence
Prepends an element to this immutable sequence
Applies a binary operator to a start value and all elements of this immutable sequence, going left to right.
[use case] Appends an element to this immutable sequence
Appends an element to this immutable sequence
Applies a binary operator to all elements of this immutable sequence and a start value, going right to left.
Projection function, which returns elements of this
sequence based on the string that
.
Projection function, which returns elements of this
sequence and of all its subsequences, based on
the string that
.
Appends all elements of this immutable sequence to a string builder.
Appends all elements of this immutable sequence to a string builder using a separator string.
Appends all elements of this immutable sequence to a string builder using start, end, and separator strings.
Composes this partial function with a transformation function that gets applied to results of this partial function.
Selects an element by its index in the immutable sequence.
Convenience method, looks up a prefixed attribute in attributes of this node.
Convenience method, looks up an unprefixed attribute in attributes of this node.
always empty@return all attributes of this node
Returns text, with some characters escaped according to the XML specification.
String representation of this node
We insist we're only equal to other xml.
always empty@return all children of this node
[use case] Builds a new collection by applying a partial function to all elements of this immutable sequence on which the function is defined.
Builds a new collection by applying a partial function to all elements of this immutable sequence on which the function is defined.
The factory companion object that builds instances of class immutable.
(f compose g)(x) == f(g(x))
Tests whether this immutable sequence contains a given value as an element.
Tests whether this immutable sequence contains a given sequence as a slice.
[use case] Copies elements of this immutable sequence to an array.
Copies elements of this immutable sequence to an array.
[use case] Copies values of this immutable sequence to an array.
Copies values of this immutable sequence to an array.
[use case] Copies values of this immutable sequence to an array.
Copies values of this immutable sequence to an array.
Copies all elements of this immutable sequence to a buffer.
Tests whether every element of this immutable sequence relates to the corresponding element of another sequence by satisfying a test predicate.
Counts the number of elements in the immutable sequence which satisfy a predicate.
Descendant axis (all descendants of this node, not including node itself) includes all text nodes, element nodes, comments and processing instructions.
Descendant axis (all descendants of this node, including thisa node) includes all text nodes, element nodes, comments and processing instructions.
[use case] Computes the multiset difference between this immutable sequence and another sequence.
Computes the multiset difference between this immutable sequence and another sequence.
Builds a new immutable sequence from this immutable sequence without any duplicate elements.
The logic formerly found in typeTag$, as best I could infer it.
Selects all elements except first n ones.
Selects all elements except last n ones.
Drops longest prefix of elements that satisfy a predicate.
Tests whether this immutable sequence ends with the given sequence.
The equality method defined in AnyRef
.
Tests whether every element of this immutable sequence relates to the corresponding element of another sequence by satisfying a test predicate.
Tests whether a predicate holds for some of the elements of this immutable sequence.
Selects all elements of this immutable sequence which satisfy a predicate.
Selects all elements of this immutable sequence which do not satisfy a predicate.
Finds the first element of the immutable sequence satisfying a predicate, if any.
Returns index of the first element satisfying a predicate, or -1
.
Returns index of the last element satisfying a predicate, or -1.
None
if iterable is empty.
[use case] Builds a new collection by applying a function to all elements of this immutable sequence and concatenating the results.
Builds a new collection by applying a function to all elements of this immutable sequence and concatenating the results.
[use case] Converts this immutable sequence of traversable collections into a immutable sequence in which all element collections are concatenated.
Converts this immutable sequence of traversable collections into a immutable sequence in which all element collections are concatenated.
Applies a binary operator to a start value and all elements of this immutable sequence, going left to right.
Applies a binary operator to all elements of this immutable sequence and a start value, going right to left.
Tests whether a predicate holds for all elements of this immutable sequence.
[use case] Applies a function f
to all elements of this immutable sequence.
Applies a function f
to all elements of this immutable sequence.
The generic builder that builds instances of immutable.
Convenience method, same as scope.
def
groupBy[K](f: (Node) ⇒ K): Map[K, NodeSeq]
Partitions this immutable sequence into a map of immutable sequences according to some discriminator function.
def
grouped(size: Int): Iterator[NodeSeq]
Partitions elements in fixed size immutable sequences.
def
hasDefiniteSize: Boolean
Tests whether this immutable sequence is known to have a finite size.
def
hashCode(): Int
It's be nice to make these final, but there are probably
people out there subclassing the XML types, especially when
it comes to equals.
def
head: Node
Selects the first element of this immutable sequence.
def
headOption: Option[Node]
Optionally selects the first element.
def
indexOf(elem: Node, from: Int): Int
[use case] Finds index of first occurrence of some value in this immutable sequence after or at some start index.
def
indexOf[B >: Node](elem: B, from: Int): Int
Finds index of first occurrence of some value in this immutable sequence after or at some start index.
def
indexOf(elem: Node): Int
[use case] Finds index of first occurrence of some value in this immutable sequence.
def
indexOf[B >: Node](elem: B): Int
Finds index of first occurrence of some value in this immutable sequence.
def
indexOfSlice[B >: Node](that: Seq[B], from: Int): Int
Finds first index after or at a start index where this immutable sequence contains a given sequence as a slice.
def
indexOfSlice[B >: Node](that: Seq[B]): Int
Finds first index where this immutable sequence contains a given sequence as a slice.
def
indexWhere(p: (Node) ⇒ Boolean, from: Int): Int
Finds index of the first element satisfying some predicate after or at some start index.
def
indexWhere(p: (Node) ⇒ Boolean): Int
Finds index of first element satisfying some predicate.
def
indices: Range
Produces the range of all indices of this sequence.
def
init: NodeSeq
Selects all elements except the last.
def
intersect(that: Seq[Node]): Seq[Node]
[use case] Computes the multiset intersection between this immutable sequence and another sequence.
def
intersect[B >: Node](that: Seq[B]): NodeSeq
Computes the multiset intersection between this immutable sequence and another sequence.
def
isAtom: Boolean
used internally.
def
isDefinedAt(idx: Int): Boolean
Tests whether this immutable sequence contains given index.
def
isEmpty: Boolean
Tests whether this immutable sequence is empty.
def
isTraversableAgain: Boolean
Tests whether this immutable sequence can be repeatedly traversed.
def
iterator: Iterator[Node]
Creates a new iterator over all elements contained in this
iterable object.
def
label: String
label of this node.
def
last: Node
Selects the last element.
def
lastIndexOf(elem: Node, end: Int): Int
[use case] Finds index of last occurrence of some value in this immutable sequence before or at a given end index.
def
lastIndexOf[B >: Node](elem: B, end: Int): Int
Finds index of last occurrence of some value in this immutable sequence before or at a given end index.
def
lastIndexOf(elem: Node): Int
[use case] Finds index of last occurrence of some value in this immutable sequence.
def
lastIndexOf[B >: Node](elem: B): Int
Finds index of last occurrence of some value in this immutable sequence.
def
lastIndexOfSlice[B >: Node](that: Seq[B], end: Int): Int
Finds last index before or at a given end index where this immutable sequence contains a given sequence as a slice.
def
lastIndexOfSlice[B >: Node](that: Seq[B]): Int
Finds last index where this immutable sequence contains a given sequence as a slice.
def
lastIndexWhere(p: (Node) ⇒ Boolean, end: Int): Int
Finds index of last element satisfying some predicate before or at given end index.
def
lastIndexWhere(p: (Node) ⇒ Boolean): Int
Finds index of last element satisfying some predicate.
def
lastOption: Option[Node]
Optionally selects the last element.
def
length: Int
The length of the immutable sequence.
def
lengthCompare(len: Int): Int
Compares the length of this immutable sequence to a test value.
def
lift: (Int) ⇒ Option[Node]
Turns this partial function into an plain function returning an Option
result.
def
map[B](f: (Node) ⇒ B): Traversable[B]
[use case] Builds a new collection by applying a function to all elements of this immutable sequence.
def
map[B, That](f: (Node) ⇒ B)(implicit bf: CanBuildFrom[NodeSeq, B, That]): That
Builds a new collection by applying a function to all elements of this immutable sequence.
def
max: Node
[use case] Finds the largest element.
def
max[B >: Node](implicit cmp: Ordering[B]): Node
Finds the largest element.
def
min: Node
[use case] Finds the smallest element.
def
min[B >: Node](implicit cmp: Ordering[B]): Node
Finds the smallest element.
def
mkString: String
Displays all elements of this immutable sequence in a string.
def
mkString(sep: String): String
Displays all elements of this immutable sequence in a string using a separator string.
def
mkString(start: String, sep: String, end: String): String
Displays all elements of this immutable sequence in a string using start, end, and separator strings.
def
nameToString(sb: StringBuilder): StringBuilder
Appends qualified name of this node to StringBuilder
.
def
namespace: Null
always Node.
def
nonEmpty: Boolean
Tests whether the immutable sequence is not empty.
def
nonEmptyChildren: Seq[Node]
Children which do not stringify to "" (needed for equality)
def
orElse[A1 <: Int, B1 >: Node](that: PartialFunction[A1, B1]): PartialFunction[A1, B1]
Composes this partial function with a fallback partial function which gets applied where this partial function
is not defined.
def
padTo(len: Int, elem: Node): Seq[Node]
[use case] Appends an element value to this immutable sequence until a given target length is reached.
def
padTo[B >: Node, That](len: Int, elem: B)(implicit bf: CanBuildFrom[NodeSeq, B, That]): That
Appends an element value to this immutable sequence until a given target length is reached.
def
partition(p: (Node) ⇒ Boolean): (NodeSeq, NodeSeq)
Partitions this immutable sequence in two immutable sequences according to a predicate.
def
patch(from: Int, that: Seq[Node], replaced: Int): Seq[Node]
[use case] Produces a new immutable sequence where a slice of elements in this immutable sequence is replaced by another sequence.
def
patch[B >: Node, That](from: Int, patch: Seq[B], replaced: Int)(implicit bf: CanBuildFrom[NodeSeq, B, That]): That
Produces a new immutable sequence where a slice of elements in this immutable sequence is replaced by another sequence.
def
prefix: String
prefix of this node
def
prefixLength(p: (Node) ⇒ Boolean): Int
Returns the length of the longest prefix whose elements all satisfy some predicate.
def
product: Int
[use case] Multiplies up the elements of this collection.
def
product[B >: Node](implicit num: Numeric[B]): B
Multiplies up the elements of this collection.
def
productArity: Int
return k for a product A(x_1,.
def
productElement(arg0: Int): Any
For a product A(x_1,.
def
productElements: Iterator[Any]
def
productIterator: Iterator[Any]
An iterator that returns all fields of this product
def
productPrefix: String
By default the empty string.
def
projection: SeqView[Node, NodeSeq]
returns a projection that can be used to call non-strict filter
,map
, and flatMap
methods that build projections
of the collection.
def
reduceLeft[B >: Node](op: (B, Node) ⇒ B): B
Applies a binary operator to all elements of this immutable sequence, going left to right.
def
reduceLeftOption[B >: Node](op: (B, Node) ⇒ B): Option[B]
Optionally applies a binary operator to all elements of this immutable sequence, going left to right.
def
reduceRight[B >: Node](op: (Node, B) ⇒ B): B
Applies a binary operator to all elements of this immutable sequence, going right to left.
def
reduceRightOption[B >: Node](op: (Node, B) ⇒ B): Option[B]
Optionally applies a binary operator to all elements of this immutable sequence, going right to left.
def
repr: NodeSeq
The collection of type immutable sequence underlying this TraversableLike
object.
def
reverse: NodeSeq
Returns new immutable sequence wih elements in reversed order.
def
reverseIterator: Iterator[Node]
An iterator yielding elements in reversed order.
def
reverseMap[B](f: (Node) ⇒ B): Seq[B]
[use case] Builds a new collection by applying a function to all elements of this immutable sequence and
collecting the results in reversed order.
def
reverseMap[B, That](f: (Node) ⇒ B)(implicit bf: CanBuildFrom[NodeSeq, B, That]): That
Builds a new collection by applying a function to all elements of this immutable sequence and
collecting the results in reversed order.
def
reversedElements: Iterator[Node]
def
sameElements(that: Iterable[Node]): Boolean
[use case] Checks if the other iterable collection contains the same elements in the same order as this immutable sequence.
def
sameElements[B >: Node](that: Iterable[B]): Boolean
Checks if the other iterable collection contains the same elements in the same order as this immutable sequence.
def
scanLeft[B, That](z: B)(op: (B, Node) ⇒ B)(implicit bf: CanBuildFrom[NodeSeq, B, That]): That
Produces a collection containing cummulative results of applying the operator going left to right.
def
scanRight[B, That](z: B)(op: (Node, B) ⇒ B)(implicit bf: CanBuildFrom[NodeSeq, B, That]): That
Produces a collection containing cummulative results of applying the operator going right to left.
def
scope: NamespaceBinding
method returning the namespace bindings of this node.
def
segmentLength(p: (Node) ⇒ Boolean, from: Int): Int
Computes length of longest segment whose elements all satisfy some predicate.
def
size: Int
The size of this immutable sequence, equivalent to length
.
def
slice(from: Int, until: Int): NodeSeq
Selects an interval of elements.
def
sliding[B >: Node](size: Int, step: Int): Iterator[NodeSeq]
def
sliding[B >: Node](size: Int): Iterator[NodeSeq]
Groups elements in fixed size blocks by passing a "sliding window"
over them (as opposed to partitioning them, as is done in grouped.
def
sortBy[B](f: (Node) ⇒ B)(implicit ord: Ordering[B]): NodeSeq
Sorts this immutable.
def
sortWith(lt: (Node, Node) ⇒ Boolean): NodeSeq
Sorts this immutable sequence according to a comparison function.
def
sorted[B >: Node](implicit ord: Ordering[B]): NodeSeq
Sorts this immutable sequence according to an Ordering.
def
span(p: (Node) ⇒ Boolean): (NodeSeq, NodeSeq)
Splits this immutable sequence into a prefix/suffix pair according to a predicate.
def
splitAt(n: Int): (NodeSeq, NodeSeq)
Splits this immutable sequence into two at a given position.
def
startsWith[B](that: Seq[B]): Boolean
Tests whether this immutable sequence starts with the given sequence.
def
startsWith[B](that: Seq[B], offset: Int): Boolean
Tests whether this immutable sequence contains the given sequence at a given index.
def
strict_!=(other: Equality): Boolean
def
strict_==(other: Equality): Boolean
def
stringPrefix: String
Defines the prefix of this object's toString
representation.
def
sum: Int
[use case] Sums up the elements of this collection.
def
sum[B >: Node](implicit num: Numeric[B]): B
Sums up the elements of this collection.
def
tail: NodeSeq
Selects all elements except the first.
def
take(n: Int): NodeSeq
Selects first n elements.
def
takeRight(n: Int): NodeSeq
Selects last n elements.
def
takeWhile(p: (Node) ⇒ Boolean): NodeSeq
Takes longest prefix of elements that satisfy a predicate.
def
text: String
Returns a text representation of this node.
def
theSeq: Seq[Node]
returns a sequence consisting of only this node
def
toArray: Array[Node]
[use case] Converts this immutable sequence to an array.
def
toArray[B >: Node](implicit arg0: ClassManifest[B]): Array[B]
Converts this immutable sequence to an array.
def
toBuffer[B >: Node]: Buffer[B]
Converts this immutable sequence to a mutable buffer.
def
toIndexedSeq[B >: Node]: IndexedSeq[B]
Converts this immutable sequence to an indexed sequence.
def
toIterable: Iterable[Node]
Converts this immutable sequence to an iterable collection.
def
toIterator: Iterator[Node]
Returns an Iterator over the elements in this immutable sequence.
def
toList: List[Node]
Converts this immutable sequence to a list.
def
toMap[T, U](implicit ev: <:<[Node, (T, U)]): Map[T, U]
Converts this immutable sequence to a map.
def
toSeq: Seq[Node]
Converts this immutable sequence to a sequence.
def
toSet[B >: Node]: Set[B]
Converts this immutable sequence to a set.
def
toStream: Stream[Node]
Converts this immutable sequence to a stream.
def
toString(): String
Same as toString(false)
.
def
toTraversable: Traversable[Node]
Converts this immutable sequence to an unspecified Traversable.
def
transpose[B](implicit asTraversable: (Node) ⇒ Traversable[B]): Seq[Seq[B]]
Transposes this immutable sequence of traversable collections into
a immutable sequence of immutable sequences.
def
union(that: Seq[Node]): Seq[Node]
[use case] Produces a new sequence which contains all elements of this immutable sequence and also all elements of
a given sequence.
def
union[B >: Node, That](that: Seq[B])(implicit bf: CanBuildFrom[NodeSeq, B, That]): That
Produces a new sequence which contains all elements of this immutable sequence and also all elements of
a given sequence.
def
unzip[A1, A2](implicit asPair: (Node) ⇒ (A1, A2)): (Seq[A1], Seq[A2])
Converts this immutable sequence of pairs into two collections of the first and second
halfs of each pair.
def
updated(index: Int, elem: Node): Seq[Node]
[use case] A copy of this immutable sequence with one single replaced element.
def
updated[B >: Node, That](index: Int, elem: B)(implicit bf: CanBuildFrom[NodeSeq, B, That]): That
A copy of this immutable sequence with one single replaced element.
def
view(from: Int, until: Int): SeqView[Node, NodeSeq]
Creates a non-strict view of a slice of this immutable sequence.
def
view: SeqView[Node, NodeSeq]
Creates a non-strict view of this immutable sequence.
def
withFilter(p: (Node) ⇒ Boolean): FilterMonadic[Node, NodeSeq]
Creates a non-strict filter of this immutable sequence.
def
xmlType(): TypeSymbol
Returns a type symbol (e.
def
xml_!=(other: Any): Boolean
def
xml_==(other: Any): Boolean
def
xml_sameElements[A](that: Iterable[A]): Boolean
def
zip[B](that: Iterable[B]): Iterable[(Node, B)]
[use case] Returns a immutable sequence formed from this immutable sequence and another iterable collection
by combining corresponding elements in pairs.
def
zip[A1 >: Node, B, That](that: Iterable[B])(implicit bf: CanBuildFrom[NodeSeq, (A1, B), That]): That
Returns a immutable sequence formed from this immutable sequence and another iterable collection
by combining corresponding elements in pairs.
def
zipAll[B](that: Iterable[B], thisElem: Node, thatElem: B): Iterable[(Node, B)]
[use case] Returns a immutable sequence formed from this immutable sequence and another iterable collection
by combining corresponding elements in pairs.
def
zipAll[B, A1 >: Node, That](that: Iterable[B], thisElem: A1, thatElem: B)(implicit bf: CanBuildFrom[NodeSeq, (A1, B), That]): That
Returns a immutable sequence formed from this immutable sequence and another iterable collection
by combining corresponding elements in pairs.
def
zipWithIndex: Iterable[(Node, Int)]
[use case] Zips this immutable sequence with its indices.
def
zipWithIndex[A1 >: Node, That](implicit bf: CanBuildFrom[NodeSeq, (A1, Int), That]): That
Zips this immutable sequence with its indices.
The class
Text
implements an XML node for text (PCDATA). It is used in both non-bound and bound XML representations.authors:
Burak Emir