ElementContainer

trait ElementContainer[+E <: Element] extends Container[Seq[E]] with ElementTraversal

A generic container of other elements. Provides means to traverse, select and rewrite children of this container.

Usually not mixed in directly, instead one of the sub-traits ListContainer, SpanContainer or BlockContainer should be used.

trait Container[Seq[E]]
class Element
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Type members

Inherited types

type Self <: Element
Inherited from:
Element

Value members

Concrete methods

override def toString: String
Definition Classes
Any

Inherited methods

def canEqual(that: Any): Boolean
Inherited from:
Equals
def collect[B](pf: PartialFunction[Element, B]): List[B]

Collects elements by applying the partial function to all elements it is defined for, in depth-first traversal, including this element itself.

Collects elements by applying the partial function to all elements it is defined for, in depth-first traversal, including this element itself.

Inherited from:
ElementTraversal
def content: Seq[E]
Inherited from:
Container
def foreach(f: Element => Unit): Unit

Invokes the specified function for each child of this element container, including children of children, and this element itself, in depth-first traversal.

Invokes the specified function for each child of this element container, including children of children, and this element itself, in depth-first traversal.

Inherited from:
ElementTraversal
def hasId: Boolean

Indicates whether this element has an id assigned.

Indicates whether this element has an id assigned.

Inherited from:
Element
def hasStyle(name: String): Boolean

Indicates whether this element has the specified style assigned.

Indicates whether this element has the specified style assigned.

Inherited from:
Element

Returns a new instance of this element with its options merged with the specified options.

Returns a new instance of this element with its options merged with the specified options.

Inherited from:
Element

Returns a new instance of this element with the new options obtained from applying the specified function to the existing value.

Returns a new instance of this element with the new options obtained from applying the specified function to the existing value.

Inherited from:
Element
Inherited from:
Element
def productArity: Int
Inherited from:
Product
def productElement(n: Int): Any
Inherited from:
Product
def productElementName(n: Int): String
Inherited from:
Product
def productElementNames: Iterator[String]
Inherited from:
Product
def productIterator: Iterator[Any]
Inherited from:
Product
def productPrefix: String
Inherited from:
Product
def select(p: Element => Boolean): List[Element]

Selects all elements satisfying the specified predicate, collecting in depth-first traversal, including this element itself.

Selects all elements satisfying the specified predicate, collecting in depth-first traversal, including this element itself.

Inherited from:
ElementTraversal
def withId(id: String): Self

Returns a new instance of this element with its id set to the specified value, overriding any existing value.

Returns a new instance of this element with its id set to the specified value, overriding any existing value.

Inherited from:
Element
def withOptions(options: Options): Self

Returns a new instance of this element with the specified options replacing the current value.

Returns a new instance of this element with the specified options replacing the current value.

Inherited from:
Element
def withStyle(name: String): Self

Returns a new instance of this element with the specified style added to its existing styles.

Returns a new instance of this element with the specified style added to its existing styles.

Inherited from:
Element
def withStyles(styles: Iterable[String]): Self

Returns a new instance of this element with the specified styles added to its existing styles.

Returns a new instance of this element with the specified styles added to its existing styles.

Inherited from:
Element
def withStyles(style: String, styles: String*): Self

Returns a new instance of this element with the specified styles added to its existing styles.

Returns a new instance of this element with the specified styles added to its existing styles.

Inherited from:
Element

Returns a new instance of this element without its id.

Returns a new instance of this element without its id.

Inherited from:
Element