Scala Library
|
|
scala/collection/SortedMapLike.scala
]
trait
SortedMapLike[A, +B, +This <: SortedMapLike[A, B, This] with
SortedMap[A, B]]
extends
Sorted[A, This] with
MapLike[A, B, This]Method Summary | |
override def
|
+
[B1 >: B](elem1 : (A, B1), elem2 : (A, B1), elems : (A, B1)*) : SortedMap[A, B1]
Adds two or more elements to this collection and returns
either the collection itself (if it is mutable), or a new collection
with the added elements.
|
abstract def
|
+
[B1 >: B](kv : (A, B1)) : SortedMap[A, B1]
Add a key/value pair to this map.
|
def
|
firstKey
: A
Returns the first key of the collection.
|
override def
|
keySet : SortedSet[A] |
def
|
lastKey
: A
Returns the last key of the collection.
|
implicit abstract def
|
ordering : Ordering[A] |
abstract def
|
rangeImpl
(from : Option[A], until : Option[A]) : This
Creates a ranged projection of this collection. Any mutations in the
ranged projection will update this collection and vice versa. Note: keys
are not garuanteed to be consistent between this collection and the projection.
This is the case for buffers where indexing is relative to the projection.
|
override def
|
updated
[B1 >: B](key : A, value : B1) : SortedMap[A, B1]
Add a key/value pair to this map.
|
Methods inherited from MapLike | |
empty (abstract), get (abstract), iterator (abstract), - (abstract), newBuilder, isEmpty, getOrElse, apply, contains, isDefinedAt, keysIterator, keys, valuesIterable, valuesIterator, values, default, filterKeys, mapValues, mapElements, ++, ++, addString, stringPrefix, toString, hashCode, equals |
Methods inherited from Subtractable | |
-, --, -- |
Methods inherited from IterableLike | |
thisCollection, toCollection, elements, foreach, forall, exists, find, foldRight, reduceRight, toIterable, head, take, slice, takeWhile, takeRight, dropRight, copyToArray, zip, zipAll, zipWithIndex, sameElements, toStream, canEqual, view, view, first, firstOption, projection |
Methods inherited from TraversableLike | |
repr, nonEmpty, size, hasDefiniteSize, ++, ++, map, flatMap, filter, filterNot, partialMap, remove, partition, groupBy, count, foldLeft, /:, :\, reduceLeft, reduceLeftOption, reduceRightOption, sum, product, min, max, headOption, tail, last, lastOption, init, drop, dropWhile, span, splitAt, copyToBuffer, copyToArray, toArray, toList, toSeq, toIndexedSeq, toSet, mkString, mkString, mkString, addString, addString, withFilter |
Methods inherited from PartialFunction | |
orElse, andThen |
Methods inherited from Function1 | |
compose |
Methods inherited from Sorted | |
compare, from, until, range, to, hasAll |
Methods inherited from AnyRef | |
getClass, clone, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized |
Methods inherited from Any | |
==, !=, isInstanceOf, asInstanceOf |
Class Summary | |
protected class
|
DefaultKeySortedSet
extends DefaultKeySet with SortedSet[A]
|
Method Details |
def
firstKey : A
def
lastKey : A
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.key -
the keyvalue -
the valuekv -
the key/value pairelem1 -
the first element to add.elem2 -
the second element to add.elems -
the remaining elements to add.
Scala Library
|
|