|
Scala
1.4.0.3 |
|||
Field Summary | |
protected abstract
|
type This
The type returned when creating a new tree. |
protected
|
type aNode
The type of nodes that the tree is build from. |
Method Summary | |
protected abstract
|
def New(sz: Int, t: GBTree[A,B]): This
This abstract method should be defined by a concrete implementation C[T] as something like: override def New(sz:Int,t:aNode):This { new C[T](order) { override def size=sz; override protected def tree:aNode=t; }The concrete implementation should also override the def of This override type This = C[T];
|
protected
|
def add(key: A, entry: B): This
A new tree with the entry added is returned, assuming that key is not in the tree. |
def balance: This
Create a new balanced tree from the tree. |
|
protected
|
def deleteAny(key: A): This
Removes the key from the tree. |
protected
|
def entries: Iterator[B]
Gives you an iterator over all elements in the tree. |
protected
|
def findValue(key: A): Option[B]
Check if this map maps key to a value and return the
value if it exists.
|
protected abstract
|
def getThis: This
|
def size: Int
The size of the tree, returns 0 (zero) if the tree is empty. |
|
protected
|
def tree: GBTree[A,B]
The nodes in the tree. |
protected
|
def updateOrAdd(key: A, entry: B): This
A new tree with the entry added is returned, if key is not in the tree, otherwise the key is updated with the new entry. |
Methods inherited from java/lang/Object-class |
clone, eq, equals, finalize, getClass, hashCode, ne, notify, notifyAll, synchronized, toString, wait, wait, wait |
Methods inherited from scala/Any-class |
!=, ==, asInstanceOf, isInstanceOf, match |
Methods inherited from scala/ScalaObject-class |
getScalaType |
Field Detail |
protected abstract type This<:Tree[A,B]
class C[T](...) extends Tree[A,B](...) { type This = C[T];
protected type aNode = GBTree[A,B]
Method Detail |
protected abstract def getThis: This
protected def tree: GBTree[A,B]
protected abstract def New(sz: Int, t: GBTree[A,B]): This
override def New(sz:Int,t:aNode):This { new C[T](order) { override def size=sz; override protected def tree:aNode=t; }The concrete implementation should also override the def of This
override type This = C[T];
def size: Int
protected def add(key: A, entry: B): This
protected def updateOrAdd(key: A, entry: B): This
protected def deleteAny(key: A): This
protected def findValue(key: A): Option[B]
key
to a value and return the
value if it exists.
key
-
the key of the mapping of interest
protected def entries: Iterator[B]
def balance: This
|
Scala
1.4.0.3 |
|||