eu.cdevreeze.yaidom

ElemBuilder

final class ElemBuilder extends NodeBuilder with ParentElemLike[ElemBuilder]

Builder for elements. See eu.cdevreeze.yaidom.NodeBuilder.

Self Type
ElemBuilder
Annotations
@SerialVersionUID( 1L )
Linear Supertypes
ParentElemLike[ElemBuilder], ParentElemApi[ElemBuilder], NodeBuilder, Serializable, Serializable, Immutable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ElemBuilder
  2. ParentElemLike
  3. ParentElemApi
  4. NodeBuilder
  5. Serializable
  6. Serializable
  7. Immutable
  8. AnyRef
  9. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ElemBuilder(qname: QName, attributes: IndexedSeq[(QName, String)], namespaces: Declarations, children: IndexedSeq[NodeBuilder])

Type Members

  1. type NodeType = Elem

    Definition Classes
    ElemBuilderNodeBuilder

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 \(p: (ElemBuilder) ⇒ Boolean): IndexedSeq[ElemBuilder]

    Shorthand for filterChildElems(p).

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

    Definition Classes
    ParentElemLikeParentElemApi
  7. final def \\(p: (ElemBuilder) ⇒ Boolean): IndexedSeq[ElemBuilder]

    Shorthand for filterElemsOrSelf(p).

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

    Definition Classes
    ParentElemLikeParentElemApi
  8. final def \\!(p: (ElemBuilder) ⇒ Boolean): IndexedSeq[ElemBuilder]

    Shorthand for findTopmostElemsOrSelf(p).

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

    Definition Classes
    ParentElemLikeParentElemApi
  9. def allDeclarationsAreAtTopLevel: Boolean

    Returns true if all namespace declarations, if any, are only at top level (so at the root of this tree).

    Returns true if all namespace declarations, if any, are only at top level (so at the root of this tree).

    It is good practice for a complete ElemBuilder tree to have only top-level namespace declarations, if any.

  10. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  11. val attributes: IndexedSeq[(QName, String)]

  12. def build(parentScope: Scope): Elem

    Creates an Elem from this element builder, using the passed parent scope.

    Creates an Elem from this element builder, using the passed parent scope.

    The Scope of the created (root) element is the passed parent scope, altered by the namespace declarations in this element builder, if any.

    Definition Classes
    ElemBuilderNodeBuilder
  13. final def build(): NodeType

    Returns build(Scope.Empty)

    Returns build(Scope.Empty)

    Definition Classes
    NodeBuilder
  14. def canBuild(parentScope: Scope): Boolean

    Returns true if parentScope suffices to build an Elem, that is, if build(parentScope) returns an Elem instead of throwing an exception.

    Returns true if parentScope suffices to build an Elem, that is, if build(parentScope) returns an Elem instead of throwing an exception.

    A complete ElemBuilder tree should obey property canBuild(Scope.Empty).

  15. val children: IndexedSeq[NodeBuilder]

  16. def clone(): AnyRef

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

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

    Definition Classes
    AnyRef → Any
  19. final def filterChildElems(p: (ElemBuilder) ⇒ Boolean): IndexedSeq[ElemBuilder]

    Core method that returns the child elements obeying the given predicate.

    Core method that returns the child elements obeying the given predicate. This method could be defined as:

    def filterChildElems(p: E => Boolean): immutable.IndexedSeq[E] =
    this.findAllChildElems.filter(p)
    Definition Classes
    ParentElemLikeParentElemApi
  20. final def filterElems(p: (ElemBuilder) ⇒ Boolean): IndexedSeq[ElemBuilder]

    Returns the descendant elements obeying the given predicate.

    Returns the descendant elements obeying the given predicate. This method could be defined as:

    this.findAllChildElems flatMap (_.filterElemsOrSelf(p))
    Definition Classes
    ParentElemLikeParentElemApi
  21. final def filterElemsOrSelf(p: (ElemBuilder) ⇒ Boolean): IndexedSeq[ElemBuilder]

    Core method that returns the descendant-or-self elements obeying the given predicate.

    Core method that returns the descendant-or-self elements obeying the given predicate. This method could be defined as:

    def filterElemsOrSelf(p: E => Boolean): immutable.IndexedSeq[E] =
    Vector(this).filter(p) ++ (this.findAllChildElems flatMap (_.filterElemsOrSelf(p)))

    It can be proven that the result is equivalent to findAllElemsOrSelf filter p.

    Definition Classes
    ParentElemLikeParentElemApi
  22. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  23. def findAllChildElems: IndexedSeq[ElemBuilder]

    Returns the element children as ElemBuilder instances

    Returns the element children as ElemBuilder instances

    Definition Classes
    ElemBuilderParentElemLikeParentElemApi
  24. final def findAllElems: IndexedSeq[ElemBuilder]

    Returns all descendant elements (not including this element).

    Returns all descendant elements (not including this element). This method could be defined as filterElems { e => true }. Equivalent to findAllElemsOrSelf.drop(1).

    Definition Classes
    ParentElemLikeParentElemApi
  25. final def findAllElemsOrSelf: IndexedSeq[ElemBuilder]

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

    Returns this element followed by all descendant elements (that is, the descendant-or-self elements). This method could be defined as filterElemsOrSelf { e => true }.

    Definition Classes
    ParentElemLikeParentElemApi
  26. final def findChildElem(p: (ElemBuilder) ⇒ Boolean): Option[ElemBuilder]

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

    Returns the first found child element obeying the given predicate, if any, wrapped in an Option. This method could be defined as filterChildElems(p).headOption.

    Definition Classes
    ParentElemLikeParentElemApi
  27. final def findElem(p: (ElemBuilder) ⇒ Boolean): Option[ElemBuilder]

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

    Returns the first found (topmost) descendant element obeying the given predicate, if any, wrapped in an Option. This method could be defined as filterElems(p).headOption.

    Definition Classes
    ParentElemLikeParentElemApi
  28. final def findElemOrSelf(p: (ElemBuilder) ⇒ Boolean): Option[ElemBuilder]

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

    Returns the first found (topmost) descendant-or-self element obeying the given predicate, if any, wrapped in an Option. This method could be defined as filterElemsOrSelf(p).headOption.

    Definition Classes
    ParentElemLikeParentElemApi
  29. final def findTopmostElems(p: (ElemBuilder) ⇒ Boolean): IndexedSeq[ElemBuilder]

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

    Returns the descendant elements obeying the given predicate that have no ancestor obeying the predicate. This method could be defined as:

    this.findAllChildElems flatMap (_.findTopmostElemsOrSelf(p))
    Definition Classes
    ParentElemLikeParentElemApi
  30. final def findTopmostElemsOrSelf(p: (ElemBuilder) ⇒ Boolean): IndexedSeq[ElemBuilder]

    Core method that returns the descendant-or-self elements obeying the given predicate, such that no ancestor obeys the predicate.

    Core method that 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: E => Boolean): immutable.IndexedSeq[E] =
    if (p(this)) Vector(this)
    else (this.findAllChildElems flatMap (_.findTopmostElemsOrSelf(p)))
    Definition Classes
    ParentElemLikeParentElemApi
  31. final def getChildElem(p: (ElemBuilder) ⇒ Boolean): ElemBuilder

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

    Returns the single child element obeying the given predicate, and throws an exception otherwise. This method could be defined as findChildElem(p).get.

    Definition Classes
    ParentElemLikeParentElemApi
  32. final def getClass(): Class[_]

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

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

    Definition Classes
    Any
  35. val namespaces: Declarations

  36. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  37. def nonDeclaredPrefixes(parentScope: Scope): Set[String]

    Returns the accumulated used but non-declared prefixes throughout the tree, given the passed parentScope.

    Returns the accumulated used but non-declared prefixes throughout the tree, given the passed parentScope. A prefix is considered used in an element if it is used in element name and/or attribute names.

  38. final def notify(): Unit

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

    Definition Classes
    AnyRef
  40. def plusChild(newChild: NodeBuilder): ElemBuilder

    Returns withChildren(self.children :+ newChild).

  41. val qname: QName

  42. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  43. final def toString(): String

    Returns toTreeRepr.

    Returns toTreeRepr.

    Definition Classes
    NodeBuilder → AnyRef → Any
  44. final def toTreeRepr(parentScope: Scope): String

    Returns the tree representation.

    Returns the tree representation. See the corresponding method in eu.cdevreeze.yaidom.Node.

    Definition Classes
    NodeBuilder
  45. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()
  48. def withChildren(newChildren: IndexedSeq[NodeBuilder]): ElemBuilder

    Creates a copy, but with (only) the children passed as parameter newChildren

Inherited from ParentElemLike[ElemBuilder]

Inherited from ParentElemApi[ElemBuilder]

Inherited from NodeBuilder

Inherited from Serializable

Inherited from Serializable

Inherited from Immutable

Inherited from AnyRef

Inherited from Any

Ungrouped