trait TreeNode extends Attributable
General behaviour for tree nodes. Case classes that implement actual tree node types should mix-in this trait.
- Source
- TreeNode.scala
- Alphabetic
- By Inheritance
- TreeNode
- Attributable
- Cloneable
- Cloneable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
->[T, U](a: (T) ⇒ U)(implicit b: (TreeNode.this.type) ⇒ T): U
Reference an attribute or function that can be applied to this node.
Reference an attribute or function that can be applied to this node.
this->attributeis equivalent toattribute(this). The attribute definition is defined on a typeTother than that of the node to which it is applied (this.type). An implicit value must exist to transform from the node type to the type expected by the attribute. This form of attribute reference is commonly used to implement attribute forwarding where the implicit parameter enables references to the attribute to be implicitly forwarded to some other node.- Definition Classes
- Attributable
- Annotations
- @inline()
-
final
def
->[U](a: (TreeNode.this.type) ⇒ U): U
Reference an attribute or function that can be applied to this node.
Reference an attribute or function that can be applied to this node.
this->attributeis equivalent toattribute(this).- Definition Classes
- Attributable
- Annotations
- @inline()
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
children: Iterator[Attributable]
This node's
Attributablechildren in left-to-right order.This node's
Attributablechildren in left-to-right order. Children that are notAttributableare ignored, except for nodes that collectAttributablechildren. Those indirect children are also collected here.- Definition Classes
- Attributable
- See also
initTreeProperties
-
def
clone(): Attributable
Make a shallow clone of this node.
Make a shallow clone of this node.
- Definition Classes
- Attributable → AnyRef
- See also
AttributableSupport.deepclone
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
firstChild[T]: T
This node's first
Attributablechild.This node's first
Attributablechild. Raises anIndexOutOfBoundsexception if this node has no such children.- Definition Classes
- Attributable
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hasChildren: Boolean
Does this node have some
Attributablechildren?Does this node have some
Attributablechildren?- Definition Classes
- Attributable
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
val
index: Int
The index of this node as a child of its parent or -1 if this node has no parent (i.e., it's a root).
The index of this node as a child of its parent or -1 if this node has no parent (i.e., it's a root).
- Definition Classes
- Attributable
-
def
initTreeProperties(): Unit
House-keeping method to connect this node's children to it and their siblings (and recursively through the subtree rooted here).
House-keeping method to connect this node's children to it and their siblings (and recursively through the subtree rooted here). The easy case is
Attributablechildren that are direct descendants. Also connected areAttributabledescendants that are reachable via a path of descendants that only passes throughGenTraversable,Some, or tuple (up to size four) nodes. Thus, descendants of these kinds are regarded as children for the purposes of attribution. As a side-effect, this method remembers the children so that they can be accessed easily via the children iterator.- Definition Classes
- Attributable
-
def
isFirst: Boolean
Is this node the first child of its parent?
Is this node the first child of its parent?
- Definition Classes
- Attributable
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isLast: Boolean
Is this node the last child of its parent?
Is this node the last child of its parent?
- Definition Classes
- Attributable
-
def
isRoot: Boolean
Is this node the root of the hierarchy?
Is this node the root of the hierarchy?
- Definition Classes
- Attributable
-
def
lastChild[T]: T
This node's last
Attributablechild.This node's last
Attributablechild. Raises anIndexOutOfBoundsexception if this node has no such children.- Definition Classes
- Attributable
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
next[T]: T
A short-hand for
next.asInstanceOf[T], which is useful in cases aT-specific operation is applied to thenext, which otherwise would be of typeAttributable.A short-hand for
next.asInstanceOf[T], which is useful in cases aT-specific operation is applied to thenext, which otherwise would be of typeAttributable.- Definition Classes
- Attributable
-
val
next: Attributable
A link to the child of the same
Attributableparent immediately to the left of this one, ornullif this is the first child of its parent.A link to the child of the same
Attributableparent immediately to the left of this one, ornullif this is the first child of its parent.- Definition Classes
- Attributable
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
def
parent[T]: T
A short-hand for
parent.asInstanceOf[T], which is useful in cases aT-specific operation is applied to the parent, which otherwise would be of typeAttributable.A short-hand for
parent.asInstanceOf[T], which is useful in cases aT-specific operation is applied to the parent, which otherwise would be of typeAttributable.- Definition Classes
- Attributable
-
val
parent: Attributable
A link to the parent
Attributablenode of this node ornullif this node has no parent.A link to the parent
Attributablenode of this node ornullif this node has no parent. Note that this link will skip intervening non-Attributableancestors.- Definition Classes
- Attributable
- See also
initTreeProperties
-
def
prev[T]: T
A short-hand for
prev.asInstanceOf[T], which is useful in cases aT-specific operation is applied to theprev, which otherwise would be of typeAttributable.A short-hand for
prev.asInstanceOf[T], which is useful in cases aT-specific operation is applied to theprev, which otherwise would be of typeAttributable.- Definition Classes
- Attributable
-
val
prev: Attributable
A link to the child of the same
Attributableparent immediately to the left of this one, ornullif this is the first child of its parent.A link to the child of the same
Attributableparent immediately to the left of this one, ornullif this is the first child of its parent.- Definition Classes
- Attributable
-
def
productIterator: Iterator[Any]
- Definition Classes
- Product
-
def
productPrefix: String
- Definition Classes
- Product
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )