final case class Location[A](tree: Tree[A], lefts: Forest[A], rights: Forest[A], parents: List[Parent[A]]) extends Product with Serializable
Zipper navigation and modification for Tree.
- Alphabetic
- By Inheritance
- Location
- Serializable
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
child(n: Int): Option[Location[A]]
Move to the nth child.
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
deepRight: Option[Location[A]]
Move to the deepest rightmost node.
Move to the deepest rightmost node.
- Annotations
- @tailrec()
-
def
delete: Option[Location[A]]
Delete the focused node and then move right, otherwise left, otherwise up.
-
def
depth: Int
Depth of location from the root.
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
forest: Forest[A]
This node and its siblings.
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
insertChild(n: Int, newTree: Tree[A]): Location[A]
Insert as the nth child and focus on the new node.
-
def
insertLeft(newTree: Tree[A]): Location[A]
Insert to the left and focus on the new node.
-
def
insertLeftmostChild(newTree: Tree[A]): Location[A]
Insert as the leftmost child and focus on the new node.
-
def
insertRight(newTree: Tree[A]): Location[A]
Insert to the right and focus on the new node.
-
def
insertRightmostChild(newTree: Tree[A]): Location[A]
Insert as the rightmost child and focus on the new node.
-
def
isBranch: Boolean
Is this a branch node (has children)?
-
def
isChild: Boolean
Is this a child node?
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isLeaf: Boolean
Is this a leaf node (no children)?
-
def
isLeftmost: Boolean
Is this the leftmost sibling node?
-
def
isRightmost: Boolean
Is this the rightmost sibling node?
-
def
isRoot: Boolean
Is this the root node?
-
def
left: Option[Location[A]]
Move to the left sibling.
-
def
leftmostChild: Option[Location[A]]
Move to the leftmost child.
- val lefts: Forest[A]
-
def
modify(f: (Tree[A]) ⇒ Tree[A]): Location[A]
Modify the focused node.
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
next: Option[Location[A]]
Move to the next location in the hierarchy in depth-first order.
-
def
nextRight: Option[Location[A]]
Move to the right, otherwise the next possible right in a parent.
Move to the right, otherwise the next possible right in a parent.
- Annotations
- @tailrec()
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
def
parent: Option[Location[A]]
Move to the parent.
- val parents: List[Parent[A]]
-
def
path: List[Location[A]]
Path from here up to the root.
-
def
prev: Option[Location[A]]
Move to the previous location in the hierarchy in depth-first order.
-
def
right: Option[Location[A]]
Move to the right sibling.
-
def
rightmostChild: Option[Location[A]]
Move to the rightmost child.
- val rights: Forest[A]
-
def
root: Location[A]
Move to the root.
Move to the root.
- Annotations
- @tailrec()
-
def
set(tree: Tree[A]): Location[A]
Replace the focused node.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- Location → AnyRef → Any
- val tree: Tree[A]
-
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( ... )