ScopeTree

final case class ScopeTree(vertices: Set[EqWrap[Scope]], edges: Map[EqWrap[Scope], Scope])

Scope Tree

Value parameters:
edges

child -> parent links. Allows to traverse the tree from leaves up to the root.

vertices

all available Scopes

Companion:
object
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Value members

Concrete methods

def add(n: Scope): ScopeTree

Adds a new scope to the tree without linking (e.g. to create a root)

Adds a new scope to the tree without linking (e.g. to create a root)

def get(name: String): Option[Scope]

Get the scope by its name

Get the scope by its name

def parent(n: Scope): Option[Scope]

Gets a parent for the given scope

Gets a parent for the given scope

def pathToRoot(scope: Scope): List[Scope]

Returns the complete path to root

Returns the complete path to root

def replace(from: Scope, to: Scope): ScopeTree

Replaces a Scope. If the replaced scope is linked to the parent, that link will be updated

Replaces a Scope. If the replaced scope is linked to the parent, that link will be updated

def root: Option[Scope]

Get the root only if one node is present

Get the root only if one node is present

Inherited methods

def productElementNames: Iterator[String]
Inherited from:
Product
def productIterator: Iterator[Any]
Inherited from:
Product