sealed trait Map[T <: Exec[T], Version, A] extends Writable with Disposable[T]
- Alphabetic
- By Inheritance
- Map
- Disposable
- Writable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def +=(entry: (K, A))(implicit tx: T): Map.this.type
- abstract def -=(vertex: K)(implicit tx: T): Map.this.type
- abstract def add(entry: (K, A))(implicit tx: T): Boolean
Marks a given key with a given value.
Marks a given key with a given value.
- entry
the key-value pair (where the key is a vertex in the full tree)
- returns
true
if the mark is new,false
if there had been a mark for the given vertex.
- abstract def debugPrint(implicit tx: T): String
- abstract def dispose()(implicit tx: T): Unit
- Definition Classes
- Disposable
- abstract def full: Tree[T, Version]
- abstract def get(vertex: K)(implicit tx: T): Option[A]
Queries for a mark at a given version vertex.
Queries for a mark at a given version vertex. Unlike
nearest
, this does not search in the map, but merely tests if the given vertex has been marked or not.- vertex
the version vertex to look up
- returns
the value associated with that vertex, or
None
if the vertex is unmarked.
- abstract def nearest(vertex: K)(implicit tx: T): (K, A)
Finds the nearest marked ancestor of a given version key.
Finds the nearest marked ancestor of a given version key. Since the map is constructed with a defined root value, this method is guaranteed to succeed—if there are no other marks in the map, it will return the root value (unless the
version
argument is illegal, i.e. has a version lower than the root vertex' version).- vertex
the key to look for. The algorithm searches for the nearest ancestor in the marked map with a version less than or equal to the given version
- returns
a pair consisting of the tree vertex found and the value with which it has been marked. If the query
version
vertex was marked, it will be that vertex which is returned, and not an ancestor.
- abstract def nearestOption(vertex: K)(implicit tx: T): Option[(K, A)]
- abstract def nearestWithFilter(vertex: K)(p: (Int) => Boolean)(implicit tx: T): Option[(K, A)]
Searches for the nearest marked ancestor, where version control is handed over to a custom predicate function.
Searches for the nearest marked ancestor, where version control is handed over to a custom predicate function. I.e., while
nearestOption
will test for a version that is less than or equal to the query version, the behaviour may be customised here. The predicate function is called with theversionInt
field of the vertices, e.g. using the tree'sintView
.Only those vertices are considered for which the predicate is
true
.Note: This currently only works correctly if the predicate tests for version anteriority!
- vertex
the query vertex
- p
the predicate function for the integer view of the vertex versions
- abstract def remove(vertex: K)(implicit tx: T): Boolean
- abstract def valueFormat: TFormat[T, A]
- abstract def write(out: DataOutput): Unit
- Definition Classes
- Writable
Concrete 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 clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated