trait Attributable extends Product with Cloneable
Common functionality for classes whose instances are to be attributed.
This trait must be extended by all classes for which the node properties
such as parent or the attribute shorthand notation -> are desired.
Also provides deep and shallow cloning support.
- Source
- Attributable.scala
- Alphabetic
- By Inheritance
- 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: (Attributable.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.- Annotations
- @inline()
-
final
def
->[U](a: (Attributable.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).- 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.- 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. -
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hasChildren: Boolean
Does this node have some
Attributablechildren? -
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).
-
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. -
def
isFirst: Boolean
Is this node the first child of its parent?
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isLast: Boolean
Is this node the last child of its parent?
-
def
isRoot: Boolean
Is this node the root of the hierarchy?
-
def
lastChild[T]: T
This node's last
Attributablechild.This node's last
Attributablechild. Raises anIndexOutOfBoundsexception if this node has no such children. -
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. -
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. -
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. -
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.- 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. -
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. -
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( ... )