trait MapLike[K, V, +C[X, Y] <: Map[X, Y]] extends collection.MapLike[K, V, C] with Iterable[(K, V)] with Growable[(K, V)]
Base trait of mutable Maps implementations
- Alphabetic
- By Inheritance
- MapLike
- Growable
- Iterable
- Iterable
- IterableOnce
- MapLike
- MapPolyTransforms
- IterableLike
- IterablePolyTransforms
- IterableMonoTransforms
- IterableOps
- FromIterable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
+=(elem: (K, V)): MapLike.this.type
${Add}s a single element to this $coll.
${Add}s a single element to this $coll.
- elem
the element to $add.
- returns
the $coll itself
- Definition Classes
- Growable
- abstract def -=(elem: (K, V)): MapLike.this.type
-
abstract
def
clear(): Unit
Clears the $coll's contents.
Clears the $coll's contents. After this operation, the $coll is empty.
- Definition Classes
- Growable
-
abstract
def
flatMap[K2, V2](f: (K, V) ⇒ IterableOnce[(K2, V2)]): C[K2, V2]
- Definition Classes
- MapPolyTransforms
-
abstract
def
fromIterable[B](coll: collection.Iterable[B]): Iterable[B]
- Definition Classes
- IterablePolyTransforms
-
abstract
def
fromIterableWithSameElemType(coll: collection.Iterable[(K, V)]): Iterable[(K, V)]
Create a collection of type
C[A]from the elements ofcoll, which has the same element type as this collection.Create a collection of type
C[A]from the elements ofcoll, which has the same element type as this collection. Overridden in StringOps and ArrayOps.- Attributes
- protected[this]
- Definition Classes
- IterableLike → IterableMonoTransforms
-
abstract
def
get(key: K): Option[V]
- Definition Classes
- MapLike
-
abstract
def
iterator(): Iterator[(K, V)]
Iterator can be used only once
Iterator can be used only once
- Definition Classes
- IterableOnce
-
abstract
def
map[K2, V2](f: (K, V) ⇒ (K2, V2)): C[K2, V2]
- Definition Classes
- MapPolyTransforms
- abstract def put(key: K, value: V): Option[V]
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
++[B >: (K, V)](xs: IterableOnce[B]): Iterable[B]
Concatenation
Concatenation
- Definition Classes
- IterablePolyTransforms
-
def
++=(xs: IterableOnce[(K, V)]): MapLike.this.type
${Add}s all elements produced by a TraversableOnce to this $coll.
${Add}s all elements produced by a TraversableOnce to this $coll.
- xs
the TraversableOnce producing the elements to $add.
- returns
the $coll itself.
- Definition Classes
- Growable
-
def
+=(elem1: (K, V), elem2: (K, V), elems: (K, V)*): MapLike.this.type
${Add}s two or more elements to this $coll.
${Add}s two or more elements to this $coll.
- elem1
the first element to $add.
- elem2
the second element to $add.
- elems
the remaining elements to $add.
- returns
the $coll itself
- Definition Classes
- Growable
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
className: String
The class name of this collection.
The class name of this collection. To be used for converting to string. Collections generally print like this:
<className>(elem_1, ..., elem_n)
- Definition Classes
- IterableOps
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
coll: MapLike.this.type
The collection itself
The collection itself
- Attributes
- protected
- Definition Classes
- Iterable → IterablePolyTransforms → IterableMonoTransforms → IterableOps
-
def
copyToArray[B >: (K, V)](xs: Array[B], start: Int = 0): xs.type
Copy all elements of this collection to array
xs, starting atstart.Copy all elements of this collection to array
xs, starting atstart.- Definition Classes
- IterableOps
-
def
drop(n: Int): C[K, V @scala.annotation.unchecked.uncheckedVariance]
The rest of the collection without its
nfirst elements.The rest of the collection without its
nfirst elements. For linear, immutable collections this should avoid making a copy.- Definition Classes
- IterableMonoTransforms
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
filter(p: ((K, V)) ⇒ Boolean): C[K, V @scala.annotation.unchecked.uncheckedVariance]
All elements satisfying predicate
pAll elements satisfying predicate
p- Definition Classes
- IterableMonoTransforms
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
flatMap[B](f: ((K, V)) ⇒ IterableOnce[B]): Iterable[B]
Flatmap
Flatmap
- Definition Classes
- IterablePolyTransforms
-
def
foldLeft[B](z: B)(op: (B, (K, V)) ⇒ B): B
Fold left
Fold left
- Definition Classes
- IterableOps
-
def
foldRight[B](z: B)(op: ((K, V), B) ⇒ B): B
Fold right
Fold right
- Definition Classes
- IterableOps
-
def
foreach[U](f: ((K, V)) ⇒ U): Unit
Apply
fto each element for its side effects Note: [U] parameter needed to help scalac's type inference.Apply
fto each element for its side effects Note: [U] parameter needed to help scalac's type inference.- Definition Classes
- IterableOps
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
def
head: (K, V)
The first element of the collection.
The first element of the collection.
- Definition Classes
- IterableOps
-
def
indexWhere(p: ((K, V)) ⇒ Boolean): Int
The index of the first element in this collection for which
pholds.The index of the first element in this collection for which
pholds.- Definition Classes
- IterableOps
-
def
isEmpty: Boolean
Is the collection empty?
Is the collection empty?
- Definition Classes
- IterableOps
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
knownSize: Int
The number of elements in this collection, if it can be cheaply computed, -1 otherwise.
The number of elements in this collection, if it can be cheaply computed, -1 otherwise. Cheaply usually means: Not requiring a collection traversal.
- Definition Classes
- IterableOps
-
def
map[B](f: ((K, V)) ⇒ B): Iterable[B]
Map
Map
- Definition Classes
- IterablePolyTransforms
-
def
mkString(sep: String): String
A string showing all elements of this collection, separated by string
sep.A string showing all elements of this collection, separated by string
sep.- Definition Classes
- IterableOps
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
nonEmpty: Boolean
Is the collection not empty?
Is the collection not empty?
- Definition Classes
- IterableOps
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
def
partition(p: ((K, V)) ⇒ Boolean): (C[K, V @scala.annotation.unchecked.uncheckedVariance], C[K, V @scala.annotation.unchecked.uncheckedVariance])
A pair of, first, all elements that satisfy prediacte
pand, second, all elements that do not.A pair of, first, all elements that satisfy prediacte
pand, second, all elements that do not. Interesting because it splits a collection in two.The default implementation provided here needs to traverse the collection twice. Strict collections have an overridden version of
partitioninBuildable, which requires only a single traversal.- Definition Classes
- IterableMonoTransforms
-
def
size: Int
The number of elements in this collection.
The number of elements in this collection. Does not terminate for infinite collections.
- Definition Classes
- IterableOps
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
tail: C[K, V @scala.annotation.unchecked.uncheckedVariance]
The rest of the collection without its first element.
The rest of the collection without its first element.
- Definition Classes
- IterableMonoTransforms
-
def
take(n: Int): C[K, V @scala.annotation.unchecked.uncheckedVariance]
A collection containing the first
nelements of this collection.A collection containing the first
nelements of this collection.- Definition Classes
- IterableMonoTransforms
-
def
to[C[X] <: collection.Iterable[X]](fi: FromIterable[C]): C[(K, V)]
Given a collection factory
fifor collections of type constructorC, convert this collection to one of typeC[A].Given a collection factory
fifor collections of type constructorC, convert this collection to one of typeC[A]. Example uses:xs.to(List) xs.to(ArrayBuffer)
- Definition Classes
- IterableOps
-
def
toArray[B >: (K, V)](implicit arg0: ClassTag[B]): Array[B]
Convert collection to array.
Convert collection to array.
- Definition Classes
- IterableOps
-
def
toString(): String
- Definition Classes
- IterableOps → Any
-
def
view: View[(K, V)]
A view representing the elements of this collection.
A view representing the elements of this collection.
- Definition Classes
- IterableOps
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
zip[B](xs: IterableOnce[B]): Iterable[((K, V), B)]
Zip.
Zip. Interesting because it requires to align to source collections.
- Definition Classes
- IterablePolyTransforms