final class ElemWithPath[E <: Aux[E]] extends ElemLike
Pair of an element and a Path. These pairs themselves offer the ElemApi query API, so they can be seen as "element implementations" themselves. They are like very light-weight "indexed" elements.
These "elements" are used in the implementation of bulk update methods in trait
, but they
can also be used in application code.UpdatableElemLike
Note that this class renders a separate query API for element-path pairs obsolete. It takes a IsNavigableApi
, using
its findAllChildElemsWithPathEntries
method, and offers the equivalent of an ElemApi
for element-path pairs.
- E
The underlying (root) element type
- Alphabetic
- By Inheritance
- ElemWithPath
- ElemLike
- ElemApi
- AnyElemApi
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- type ThisElem = ElemWithPath[E]
The element type itself.
The element type itself. It must be restricted to a sub-type of the query API trait in question.
Concrete element classes will restrict this type to that element class itself.
- Definition Classes
- ElemWithPath → ElemLike → ElemApi → AnyElemApi
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##(): Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def \(p: (ThisElem) => Boolean): IndexedSeq[ThisElem]
Shorthand for
filterChildElems(p)
. - def \\(p: (ThisElem) => Boolean): IndexedSeq[ThisElem]
Shorthand for
filterElemsOrSelf(p)
. - def \\!(p: (ThisElem) => Boolean): IndexedSeq[ThisElem]
Shorthand for
findTopmostElemsOrSelf(p)
. - final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- val elem: E
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def filterChildElems(p: (ThisElem) => Boolean): IndexedSeq[ThisElem]
Returns the child elements obeying the given predicate.
- def filterElems(p: (ThisElem) => Boolean): IndexedSeq[ThisElem]
Returns the descendant elements obeying the given predicate, in document order.
- def filterElemsOrSelf(p: (ThisElem) => Boolean): IndexedSeq[ThisElem]
Returns the descendant-or-self elements obeying the given predicate, in document order.
Returns the descendant-or-self elements obeying the given predicate, in document order. This method could be defined as:
def filterElemsOrSelf(p: ThisElem => Boolean): immutable.IndexedSeq[ThisElem] = Vector(this).filter(p) ++ (this.findAllChildElems flatMap (_.filterElemsOrSelf(p)))
It can be proven that the result is equivalent to
findAllElemsOrSelf filter p
. - def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def findAllChildElems: IndexedSeq[ElemWithPath[E]]
Core method that returns all child elements, in the correct order.
Core method that returns all child elements, in the correct order. Other operations can be defined in terms of this one.
- Definition Classes
- ElemWithPath → ElemLike → ElemApi
- def findAllElems: IndexedSeq[ThisElem]
Returns all descendant elements (not including this element), in document order.
- def findAllElemsOrSelf: IndexedSeq[ThisElem]
Returns this element followed by all descendant elements (that is, the descendant-or-self elements), in document order.
- def findChildElem(p: (ThisElem) => Boolean): Option[ThisElem]
Returns the first found child element obeying the given predicate, if any, wrapped in an
Option
. - def findElem(p: (ThisElem) => Boolean): Option[ThisElem]
Returns the first found (topmost) descendant element obeying the given predicate, if any, wrapped in an
Option
. - def findElemOrSelf(p: (ThisElem) => Boolean): Option[ThisElem]
Returns the first found (topmost) descendant-or-self element obeying the given predicate, if any, wrapped in an
Option
. - def findTopmostElems(p: (ThisElem) => Boolean): IndexedSeq[ThisElem]
Returns the descendant elements obeying the given predicate that have no ancestor obeying the predicate.
- def findTopmostElemsOrSelf(p: (ThisElem) => Boolean): IndexedSeq[ThisElem]
Returns the descendant-or-self elements obeying the given predicate, such that no ancestor obeys the predicate.
Returns the descendant-or-self elements obeying the given predicate, such that no ancestor obeys the predicate. This method could be defined as:
def findTopmostElemsOrSelf(p: ThisElem => Boolean): immutable.IndexedSeq[ThisElem] = if (p(this)) Vector(this) else (this.findAllChildElems flatMap (_.findTopmostElemsOrSelf(p)))
- def getChildElem(p: (ThisElem) => Boolean): ThisElem
Returns the single child element obeying the given predicate, and throws an exception otherwise.
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val path: Path
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def thisElem: ThisElem
This element itself.
This element itself.
- Definition Classes
- ElemWithPath → AnyElemApi
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()