eu.cdevreeze.yaidom.queryapi

TransformableElemLike

trait TransformableElemLike[N, E <: N with TransformableElemLike[N, E]] extends TransformableElemApi[N, E]

API and implementation trait for transformable elements.

More precisely, this trait has abstract methods transformChildElems and transformChildElemsToNodeSeq. Based on these abstract methods, this trait offers a rich API for transforming descendant elements or descendant-or-self elements.

The purely abstract API offered by this trait is eu.cdevreeze.yaidom.queryapi.TransformableElemApi. See the documentation of that trait for examples of usage.

N

The node supertype of the element subtype

E

The captured element subtype

Self Type
E
Linear Supertypes
TransformableElemApi[N, E], AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. TransformableElemLike
  2. TransformableElemApi
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def transformChildElems(f: (E) ⇒ E): E

    Returns the same element, except that child elements have been replaced by applying the given function.

    Returns the same element, except that child elements have been replaced by applying the given function. Non-element child nodes occur in the result element unaltered.

    That is, returns the equivalent of:

    val newChildren =
      children map {
        case e: E => f(e)
        case n: N => n
      }
    withChildren(newChildren)
    Definition Classes
    TransformableElemLikeTransformableElemApi
  2. abstract def transformChildElemsToNodeSeq(f: (E) ⇒ IndexedSeq[N]): E

    Returns the same element, except that child elements have been replaced by applying the given function.

    Returns the same element, except that child elements have been replaced by applying the given function. Non-element child nodes occur in the result element unaltered.

    That is, returns the equivalent of:

    val newChildren =
      children flatMap {
        case e: E => f(e)
        case n: N => Vector(n)
      }
    withChildren(newChildren)
    Definition Classes
    TransformableElemLikeTransformableElemApi

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[java.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[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): 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 transformElems(f: (E) ⇒ E): E

    Transforms the element by applying the given function to all its descendant elements, in a bottom-up manner.

    Transforms the element by applying the given function to all its descendant elements, in a bottom-up manner.

    That is, returns the equivalent of:

    transformChildElems (e => e.transformElemsOrSelf(f))
    Definition Classes
    TransformableElemLikeTransformableElemApi
  20. final def transformElemsOrSelf(f: (E) ⇒ E): E

    Transforms the element by applying the given function to all its descendant-or-self elements, in a bottom-up manner.

    Transforms the element by applying the given function to all its descendant-or-self elements, in a bottom-up manner.

    That is, returns the equivalent of:

    f(transformChildElems (e => e.transformElemsOrSelf(f)))

    In other words, returns the equivalent of:

    f(transformElems(f))
    Definition Classes
    TransformableElemLikeTransformableElemApi
  21. final def transformElemsOrSelfToNodeSeq(f: (E) ⇒ IndexedSeq[N]): IndexedSeq[N]

    Transforms each descendant element to a node sequence by applying the given function to all its descendant-or-self elements, in a bottom-up manner.

    Transforms each descendant element to a node sequence by applying the given function to all its descendant-or-self elements, in a bottom-up manner.

    That is, returns the equivalent of:

    f(transformChildElemsToNodeSeq(e => e.transformElemsOrSelfToNodeSeq(f)))

    In other words, returns the equivalent of:

    f(transformElemsToNodeSeq(f))
    Definition Classes
    TransformableElemLikeTransformableElemApi
  22. final def transformElemsToNodeSeq(f: (E) ⇒ IndexedSeq[N]): E

    Transforms each descendant element to a node sequence by applying the given function to all its descendant elements, in a bottom-up manner.

    Transforms each descendant element to a node sequence by applying the given function to all its descendant elements, in a bottom-up manner. The function is not applied to this element itself.

    That is, returns the equivalent of:

    transformChildElemsToNodeSeq(e => e.transformElemsOrSelfToNodeSeq(f))

    It is equivalent to the following expression:

    transformElemsOrSelf { e => e.transformChildElemsToNodeSeq(che => f(che)) }
    Definition Classes
    TransformableElemLikeTransformableElemApi
  23. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from TransformableElemApi[N, E]

Inherited from AnyRef

Inherited from Any

Ungrouped