Lookup.Mutable

trait Mutable[A, B] extends Lookup[A, B]

Mutable Lookup Collection

Mutable lookup collection provides methods to modify its content

Note. Lookup.Mutable DOES NOT extend Collection.Mutable, as it if impossible to reconsile operations.

Source
__.scala
trait Lookup[A, B]
trait Collection[B]
trait Able.Size
trait Able.~[B]
class java.lang.Object
trait scala.Matchable
class Any

Def

@scala.annotation.targetName("stream")
def ~: ~[B]

Value stream

Value stream

Returns a Stream of all values for this Lookup

Inherited from
Lookup
Source
__.scala
@scala.annotation.targetName("_putAll")
def ++=(s: ~[(A, B)]): Lookup.Mutable[A, B]

Alias for putAll

Alias for putAll

Source
__.scala
@scala.annotation.targetName("_put")
def +=(v: (A, B)): Lookup.Mutable[A, B]

Alias for put

Alias for put

Source
__.scala
@scala.annotation.targetName("_removeAll")
def --=(keys: ~[A]): Lookup.Mutable[A, B]

Alias for removeAll

Alias for removeAll

Source
__.scala
@scala.annotation.targetName("_remove")
def -=(key: A): Lookup.Mutable[A, B]

Alias for remove

Alias for remove

Source
__.scala
def clear: Unit

Make empty

Make empty

Discards all entries, collection size will become zero

Source
__.scala
def get(v: A): B

Element by key

Element by key

Returns element associated with the given key

Note. This operation will fail, if value is not found. Thus, use safer get_? in most cases

Inherited from
Lookup
Source
__.scala
@scala.annotation.targetName("get_Stream")
def get_~(keys: ~[A]): ~[B]

Multi key lookup

Multi key lookup

Returns a stream of values for given stream of keys.

Note: There may be less values, than keys. Keys with no assosiated values are ignored.

Inherited from
Lookup
Source
__.scala
@scala.annotation.targetName("get_Opt")
def get_?(key: A): Opt[B]

Optional element by key

Optional element by key

Optionally returns element associated with the given key

Inherited from
Lookup
Source
__.scala
def getOrPut(key: A, v: => B): B

Get or create key/value association

Get or create key/value association

Returns existent value assisiated with the given key.

If the association does not exist, it will be created with the given default value, and then same value will be returned.

Source
__.scala
override def isEmpty: Boolean

Empty check

Empty check

Returns true if instance is empty.

Definition Classes
Inherited from
Size
Source
Size.scala
@scala.annotation.targetName("key_Stream")
def key_~: ~[A]

Key stream

Key stream

Returns a Stream of all keys for this Lookup

Inherited from
Lookup
Source
__.scala
@scala.annotation.targetName("pair_Stream")
def pair_~: ~[(A, B)]

Key/value pair stream

Key/value pair stream

Returns a Stream of all key/value pairs for this Lookup

Inherited from
Lookup
Source
__.scala
def put(key: A, value: B): Unit

Create key/value association

Create key/value association

If given key entry already exists, it will be overridden with given value

If given key entry does not exist, it will be added, with collection increasing in size

Source
__.scala
def putAll(s: ~[(A, B)]): Unit

Create multitiple key/value associations

Create multitiple key/value associations

This operation executes put for every stream entry

Source
__.scala
def remove(v: A): Opt[B]

Remove key association

Remove key association

Removes given key and value associated with it

Optionally returns the removed value, if it was indeed removed.

Source
__.scala
def removeAll(keys: ~[A]): ~[B]

Remove milti key associations

Remove milti key associations

Removes given stream of keys and values associated with them

Returns stream of removed values

Source
__.scala
override def size: Int

Element count

Element count

Retuns element count

Definition Classes
Inherited from
Collection
Source
__.scala
def update(key: A, value: B): Opt[B]

Update key/value association

Update key/value association

Unlike put, this operation will only update existing association, and will do nothing for non-existent.

Source
__.scala
def updateAll(s: ~[(A, B)]): ~[B]

Update multiple key/value associations

Update multiple key/value associations

This operation executes update for every stream entry

Source
__.scala