package prioritymap
- Alphabetic
- Public
- All
Type Members
-
trait
PriorityMap
[A, B] extends Map[A, B] with PriorityMapLike[A, B, PriorityMap[A, B]]
A generic trait for immutable priority maps.
A generic trait for immutable priority maps. Concrete classes have to provide functionality for the abstract methods in
PriorityMap
:implicit def ordering: Ordering[B] def get(key: A): Option[B] def iterator: Iterator[(A, B)] def +(kv: (A, B)): PriorityMap[A, B] def +[B1 >: B](kv: (A, B1)): Map[A, B1] def -(key: A): PriorityMap[A, B] def rangeImpl(from: Option[B], until: Option[B]): PriorityMap[A, B]
The iterator returned by
iterator
should generate key/value pairs in the order specified by the implicit ordering on values.Concrete classes may also override other methods for efficiency.
-
class
PriorityMapBuilder
[A, B, Coll <: PriorityMap[A, B] with PriorityMapLike[A, B, Coll]] extends MapBuilder[A, B, Coll]
The canonical builder for immutable priority maps, using the
+
method to add new elements to an empty priority map. -
abstract
class
PriorityMapFactory
[CC[A, B] <: PriorityMap[A, B] with PriorityMapLike[A, B, CC[A, B]]] extends AnyRef
A template for companion objects of PriorityMap and subclasses thereof.
-
trait
PriorityMapLike
[A, B, +This <: PriorityMapLike[A, B, This] with PriorityMap[A, B]] extends MapLike[A, B, This]
A template trait for immutable priority maps.
A template trait for immutable priority maps. To create a concrete priority map, you need to implement the following methods in addition to those of
MapLike
:implicit def ordering: Ordering[B] def +(kv: (A, B)): This def rangeImpl(from: Option[B], until: Option[B]): This
The iterator returned by
iterator
should generate key/value pairs in the order specified by the implicit ordering on values.Concrete classes may also override other methods for efficiency.
-
final
class
StandardPriorityMap
[A, B] extends PriorityMap[A, B] with PriorityMapLike[A, B, StandardPriorityMap[A, B]] with Serializable
Default implementation of immutable priority maps using a pair of maps.
Value Members
-
object
PriorityMap
extends PriorityMapFactory[PriorityMap]
This object provides a set of operations needed to create priority maps.
-
object
StandardPriorityMap
extends PriorityMapFactory[StandardPriorityMap] with Serializable
This object provides a set of operations needed to create priority maps.