Lookup

trait Lookup[A, +B] extends Collection[B]

Lookup Collection

In Lookup collection every element is stored with a 'key' and can be accessed (looked up) with this 'key'

It is a greatly simplified equivalent of scala.Map

Source
__.scala
trait Collection[Lookup.B]
trait Able.Size
trait Able.Stream[Lookup.B]
class java.lang.Object
trait scala.Matchable
class Any
trait J.Object
trait Lookup.Mutable[Lookup.Mutable.A, Lookup.Mutable.B]
class Lookup.Mutable.X.Abstract[Lookup.Mutable.X.Abstract.A, Lookup.Mutable.X.Abstract.B]
class Lookup.Mutable.X.Concurrent[Lookup.Mutable.X.Concurrent.A, Lookup.Mutable.X.Concurrent.B]
class Lookup.Mutable.X.Basic[Lookup.Mutable.X.Basic.A, Lookup.Mutable.X.Basic.B]
class Lookup.Stable[Lookup.Stable.A, Lookup.Stable.B]
class Byte.G.Lookup.Stable[Byte.G.Lookup.Stable.A, Byte.G.Lookup.Stable.B]
class Char.G.Lookup.Stable[Char.G.Lookup.Stable.A, Char.G.Lookup.Stable.B]
class Int.G.Lookup.Stable[Int.G.Lookup.Stable.A, Int.G.Lookup.Stable.B]
class Long.G.Lookup.Stable[Long.G.Lookup.Stable.A, Long.G.Lookup.Stable.B]
class Short.G.Lookup.Stable[Short.G.Lookup.Stable.A, Short.G.Lookup.Stable.B]

Def

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 getOpt in most cases

Source
__.scala
def getOpt(key: A): Opt[B]

Optional element by key

Optional element by key

Optionally returns element associated with the given key

Source
__.scala
def getStream(keys: Stream[A]): Stream[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.

Source
__.scala
def keyStream: Stream[A]

Key stream

Key stream

Returns a Stream of all keys for this Lookup

Source
__.scala
def pairStream: Stream[(A, B)]

Key/value pair stream

Key/value pair stream

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

Source
__.scala
def size: Int
Inherited from
Collection
Source
__.scala
def stream: Stream[B]

Value stream

Value stream

Returns a Stream of all values for this Lookup

Source
__.scala

Extension

def mapView[A, B](f: B => C): Lookup[A, C]
Source
__.scala
def toMapView[A, B]: scala.collection.Map[A, B]
Source
__.scala
def toPartialFunctionView[A, B]: scala.PartialFunction[A, B]
Source
__.scala