AnyRefMap

object AnyRefMap
Companion
class
class Object
trait Matchable
class Any

Type members

Classlikes

final class AnyRefMapBuilder[K <: AnyRef, V] extends ReusableBuilder[(K, V), AnyRefMap[K, V]]

A builder for instances of AnyRefMap.

A builder for instances of AnyRefMap.

This builder can be reused to create multiple instances.

Value members

Concrete methods

def apply[K <: AnyRef, V](elems: (K, V)*): AnyRefMap[K, V]

Creates a new AnyRefMap with zero or more key/value pairs.

Creates a new AnyRefMap with zero or more key/value pairs.

def empty[K <: AnyRef, V]: AnyRefMap[K, V]

Creates a new empty AnyRefMap.

Creates a new empty AnyRefMap.

def from[K <: AnyRef, V](source: IterableOnce[(K, V)]): AnyRefMap[K, V]

Creates a new AnyRefMap from an existing source collection.

Creates a new AnyRefMap from an existing source collection. A source collection which is already an AnyRefMap gets cloned.

Type Params
K

the type of the keys

V

the type of the values

Value Params
source

Source collection

Returns

a new AnyRefMap with the elements of source

def fromZip[K <: AnyRef, V](keys: Array[K], values: Array[V]): AnyRefMap[K, V]

Creates a new AnyRefMap from arrays of keys and values.

Creates a new AnyRefMap from arrays of keys and values. Equivalent to but more efficient than AnyRefMap((keys zip values): _*).

def fromZip[K <: AnyRef, V](keys: Iterable[K], values: Iterable[V]): AnyRefMap[K, V]

Creates a new AnyRefMap from keys and values.

Creates a new AnyRefMap from keys and values. Equivalent to but more efficient than AnyRefMap((keys zip values): _*).

def newBuilder[K <: AnyRef, V]: ReusableBuilder[(K, V), AnyRefMap[K, V]]
def withDefault[K <: AnyRef, V](default: K => V): AnyRefMap[K, V]

Creates a new empty AnyRefMap with the supplied default

Creates a new empty AnyRefMap with the supplied default

Implicits

Implicits

implicit def buildFromAnyRefMap[K <: AnyRef, V]: BuildFrom[AnyRefMap[_, _], (K, V), AnyRefMap[K, V]]
implicit def iterableFactory[K <: AnyRef, V]: Factory[(K, V), AnyRefMap[K, V]]
implicit def toBuildFrom[K <: AnyRef, V](factory: AnyRefMap): BuildFrom[Any, (K, V), AnyRefMap[K, V]]
implicit def toFactory[K <: AnyRef, V](dummy: AnyRefMap): Factory[(K, V), AnyRefMap[K, V]]