Node

com.phasmidsoftware.tableparser.core.write.Node
See theNode companion class
object Node

Companion object to Node.

Attributes

Companion
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Node.type

Members list

Type members

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements.

The names of the product elements.

Attributes

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type.

The name of the type.

Attributes

Inherited from:
Mirror

Value members

Concrete methods

def apply(style: String, attributes: Map[String, String]): Node

Create a content-less leaf Node (with no children). NOTE: I'm not sure if this makes sense and is only used by unit tests.

Create a content-less leaf Node (with no children). NOTE: I'm not sure if this makes sense and is only used by unit tests.

Value parameters

attributes

the attributes of this Node (may be empty).

style

a label that characterizes a particular node type. This will typically be translated directly into the "tag" parameter of the corresponding U type.

Attributes

Returns

a new Node.

def apply(style: String, content: Option[String], attributes: Map[String, String]): Node

Create a leaf Node (with no children).

Create a leaf Node (with no children).

Value parameters

attributes

the attributes of this Node (may be empty).

content

the content of this Node, if any.

style

a label that characterizes a particular node type. This will typically be translated directly into the "tag" parameter of the corresponding U type.

Attributes

Returns

a new Node.

def apply(style: String): Node

Create a content-less, no-attribute, leaf Node (with no children). NOTE: I'm not sure if this makes sense and is only used by unit tests.

Create a content-less, no-attribute, leaf Node (with no children). NOTE: I'm not sure if this makes sense and is only used by unit tests.

Value parameters

style

a label that characterizes a particular node type. This will typically be translated directly into the "tag" parameter of the corresponding U type.

Attributes

Returns

a new Node.

def apply(style: String, children: Seq[Node]): Node

Create a Node with only style and children.

Create a Node with only style and children.

Value parameters

children

the children of this Node (may be empty).

style

a label that characterizes a particular node type. This will typically be translated directly into the "tag" parameter of the corresponding U type.

Attributes

Returns

a new Node.

def apply(style: String, attributes: Map[String, String], children: Seq[Node]): Node

Create a Node with no content.

Create a Node with no content.

Value parameters

attributes

the attributes of this Node (may be empty).

children

the children of this Node (may be empty).

style

a label that characterizes a particular node type. This will typically be translated directly into the "tag" parameter of the corresponding U type.

Attributes

Returns

a new Node.

def mergeLeft(left: Node, right: Node): Node

TODO can eliminate

TODO can eliminate

Merge two Nodes together, taking the style, content (if any) and attributes from the left node.

Value parameters

left

the left Node (its children will precede the children of the right Node).

right

the right Node (its children will succeed the children of the left Node).

Attributes

Returns

a new Node containing all the children of the left and right.

def mergeRight(left: Node, right: Node): Node

TODO can eliminate

TODO can eliminate

Merge two Nodes together, taking the style, content (if any) and attributes from the right node.

Value parameters

left

the left Node (its children will precede the children of the right Node).

right

the right Node (its children will succeed the children of the left Node).

Attributes

Returns

a new Node containing all the children of the left and right.