Scala Library
|
|
trait
SortedMap[A, +B]
extends
Map[A, B] with
SortedMap[A, B]Method Summary | |
override def
|
+
[B1 >: B](kv1 : (A, B1), kv2 : (A, B1), kvs : (A, B1)*) : SortedMap[A, B1]
Add two or more key/value pairs to this map.
|
override def
|
+
[B1 >: B](kv : (A, B1)) : SortedMap[A, B1]
Add a key/value pair to this map.
|
override def
|
++
[B1 >: B](kvs : Iterable[(A, B1)]) : SortedMap[A, B1]
Add a sequence of key/value pairs to this map.
|
override def
|
++
[B1 >: B](kvs : Iterator[(A, B1)]) : SortedMap[A, B1]
Add a sequence of key/value pairs to this map.
|
override def
|
-
(key1 : A, key2 : A, keys : A*) : SortedMap[A, B]
Remove two or more keys from this map
|
override abstract def
|
-
(key : A) : SortedMap[A, B]
Remove a key from this map
|
override def
|
--
(keys : Iterator[A]) : SortedMap[A, B]
Remove a sequence of keys from this map
|
override def
|
--
(keys : Iterable[A]) : SortedMap[A, B]
Remove a sequence of keys from this map
|
override abstract def
|
empty
[C] : SortedMap[A, C]
This method returns a new map instance of the same class
mapping keys of the same type to values of type
C . |
override def
|
filter
(p : ((A, B)) => Boolean) : SortedMap[A, B]
This method removes all the mappings for which the predicate
p returns false . |
override def
|
from
(from : A) : SortedMap[A, B]
Creates a ranged projection of this collection with no upper-bound.
|
override def
|
range
(from : A, until : A) : SortedMap[A, B]
Creates a ranged projection of this collection with both a lower-bound
and an upper-bound.
|
override abstract def
|
rangeImpl
(from : Option[A], until : Option[A]) : SortedMap[A, B]
Creates a ranged projection of this collection. Any mutations in the
ranged projection will update this collection and vice versa. Keys
are garuanteed to be consistent between the collection and its projection.
|
override def
|
transform
[C](f : (A, B) => C) : SortedMap[A, C]
This function transforms all the values of mappings contained
in this map with function
f . |
override def
|
until
(until : A) : SortedMap[A, B]
Creates a ranged projection of this collection with no lower-bound.
|
override abstract def
|
update
[B1 >: B](key : A, value : B1) : SortedMap[A, B1]
This method allows one to create a new map with an
additional mapping from
key
to value . If the map contains already a
mapping for key , it will be overridden by this
function. |
Methods inherited from SortedMap | |
firstKey, lastKey, keySet |
Methods inherited from Sorted | |
to, hasAll |
Methods inherited from Map | |
withDefault, withDefaultValue, +, incl, incl, excl, excl, mappingToString |
Methods inherited from Map | |
size (abstract), get (abstract), getOrElse, isEmpty, apply, contains, isDefinedAt, keys, values, equals, hashCode, toString, default, projection, filterKeys, mapElements, stringPrefix |
Methods inherited from Collection | |
toArray |
Methods inherited from Iterable | |
elements (abstract), concat, ++, map, flatMap, partition, takeWhile, dropWhile, take, drop, foreach, forall, exists, find, findIndexOf, indexOf, foldLeft, foldRight, /:, :\, reduceLeft, reduceRight, copyToBuffer, sameElements, toList, toSeq, toStream, mkString, mkString, mkString, addString, addString, addString, copyToArray, hasDefiniteSize |
Methods inherited from PartialFunction | |
orElse, andThen |
Methods inherited from Function1 | |
compose |
Methods inherited from AnyRef | |
getClass, clone, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized |
Methods inherited from Any | |
==, !=, isInstanceOf, asInstanceOf |
Methods inherited from Ranged | |
compare (abstract) |
Method Details |
from -
The lower-bound (inclusive) of the ranged projection. None
if there is no lower bound.until -
The upper-bound (exclusive) of the ranged projection. None
if there is no upper bound.from -
The lower-bound (inclusive) of the ranged projection.until -
The upper-bound (exclusive) of the ranged projection.from -
The upper-bound (exclusive) of the ranged projection.until -
...C
.key
to value
. If the map contains already a
mapping for key
, it will be overridden by this
function.key -
...value -
...+({A, B})
insteadkv -
the key/value pair.kv1 -
the first key/value pair.kv2 -
the second key/value pair.kvs -
the remaining key/value pairs.kvs -
the iterable object containing all key/value pairs.kvs -
the iterator containing all key/value pairs.key -
the key to be removedkey
it is returned unchanged. Otherwise, return a new map
without a binding for key
key1 -
the first key to be removedkey2 -
the second key to be removedkeys -
the remaining keys to be removedkeys
If the map is mutable, the bindings are removed in place
and the map itself is returned.
If the map is immutable, a new map with the bindings removed is returned.keys -
the keys to be removedkeys -
the keys to be removedf
.f -
A function over keys and valuesp
returns false
.p -
A prediacte over key-value pairs
Scala Library
|
|