eu.cdevreeze.yaidom

ParentElemApi

trait ParentElemApi[E <: ParentElemApi[E]] extends AnyRef

API for elements as containers of elements, as element nodes in a node tree. See ParentElemLike.

This purely abstract query API trait leaves the implementation completely open. For example, an implementation backed by an XML database would not use the ParentElemLike implementation, for reasons of efficiency.

E

The captured element subtype

Self Type
E
Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. ParentElemApi
  2. AnyRef
  3. Any
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def \(p: (E) ⇒ Boolean): IndexedSeq[E]

    Shorthand for filterChildElems(p).

    Shorthand for filterChildElems(p). Use this shorthand only if the predicate is a short expression.

  2. abstract def \\(p: (E) ⇒ Boolean): IndexedSeq[E]

    Shorthand for filterElemsOrSelf(p).

    Shorthand for filterElemsOrSelf(p). Use this shorthand only if the predicate is a short expression.

  3. abstract def \\!(p: (E) ⇒ Boolean): IndexedSeq[E]

    Shorthand for findTopmostElemsOrSelf(p).

    Shorthand for findTopmostElemsOrSelf(p). Use this shorthand only if the predicate is a short expression.

  4. abstract def allChildElems: IndexedSeq[E]

    Returns all child elements, in the correct order.

    Returns all child elements, in the correct order.

    Note that this method is named "allChildElems" instead of "findAllChildElems". The latter name would be more consistent with the rest of this API, but the chosen name illustrates that allChildElems is seen more as "data" than as a "computation".

  5. abstract def collectFromChildElems[B](pf: PartialFunction[E, B]): IndexedSeq[B]

    Returns allChildElems collect pf

  6. abstract def collectFromElems[B](pf: PartialFunction[E, B]): IndexedSeq[B]

    Returns (the equivalent of) findAllElems collect pf

  7. abstract def collectFromElemsOrSelf[B](pf: PartialFunction[E, B]): IndexedSeq[B]

    Returns (the equivalent of) findAllElemsOrSelf collect pf

  8. abstract def filterChildElems(p: (E) ⇒ Boolean): IndexedSeq[E]

    Returns the child elements obeying the given predicate

  9. abstract def filterElems(p: (E) ⇒ Boolean): IndexedSeq[E]

    Returns the descendant elements obeying the given predicate, that is, findAllElems filter p

  10. abstract def filterElemsOrSelf(p: (E) ⇒ Boolean): IndexedSeq[E]

    Returns the descendant-or-self elements that obey the given predicate.

    Returns the descendant-or-self elements that obey the given predicate. That is, the result is equivalent to findAllElemsOrSelf filter p.

  11. abstract def findAllElems: IndexedSeq[E]

    Returns all descendant elements (not including this element).

    Returns all descendant elements (not including this element). Equivalent to findAllElemsOrSelf.drop(1)

  12. abstract def findAllElemsOrSelf: IndexedSeq[E]

    Returns this element followed by all descendant elements (that is, the descendant-or-self elements)

  13. abstract def findChildElem(p: (E) ⇒ Boolean): Option[E]

    Returns the first found child element obeying the given predicate, if any, wrapped in an Option

  14. abstract def findElem(p: (E) ⇒ Boolean): Option[E]

    Returns the first found (topmost) descendant element obeying the given predicate, if any, wrapped in an Option

  15. abstract def findElemOrSelf(p: (E) ⇒ Boolean): Option[E]

    Returns the first found (topmost) descendant-or-self element obeying the given predicate, if any, wrapped in an Option

  16. abstract def findTopmostElems(p: (E) ⇒ Boolean): IndexedSeq[E]

    Returns the descendant elements obeying the given predicate that have no ancestor obeying the predicate

  17. abstract def findTopmostElemsOrSelf(p: (E) ⇒ Boolean): IndexedSeq[E]

    Returns the descendant-or-self elements that obey the given predicate, such that no ancestor obeys the predicate.

  18. abstract def getChildElem(p: (E) ⇒ Boolean): E

    Returns the single child element obeying the given predicate, and throws an exception otherwise

  19. abstract def getIndex[K](f: (E) ⇒ K): Map[K, IndexedSeq[E]]

    Computes an index on the given function taking an element, that is, returns findAllElemsOrSelf groupBy f.

Concrete Value Members

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

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

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

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

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

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  8. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  11. final def getClass(): java.lang.Class[_]

    Definition Classes
    AnyRef → Any
  12. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  15. final def notify(): Unit

    Definition Classes
    AnyRef
  16. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  17. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  18. def toString(): String

    Definition Classes
    AnyRef → Any
  19. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from AnyRef

Inherited from Any