Trait/Object

play.api.libs.typedmap

TypedMap

Related Docs: object TypedMap | package typedmap

Permalink

trait TypedMap extends AnyRef

A TypedMap is an immutable map containing typed values. Each entry is associated with a TypedKey that can be used to look up the value. A TypedKey also defines the type of the value, e.g. a TypedKey[String] would be associated with a String value.

Instances of this class are created with the TypedMap.empty method.

The elements inside TypedMaps cannot be enumerated. This is a decision designed to enforce modularity. It's not possible to accidentally or intentionally access a value in a TypedMap without holding the corresponding TypedKey.

Source
TypedMap.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TypedMap
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def +(entries: TypedEntry[_]*): TypedMap

    Permalink

    Update the map with several entries, returning a new instance of the map.

    Update the map with several entries, returning a new instance of the map.

    entries

    The new entries to add to the map.

    returns

    A new instance of the map with the new entries added.

  2. abstract def apply[A](key: TypedKey[A]): A

    Permalink

    Get a value from the map, throwing an exception if it is not present.

    Get a value from the map, throwing an exception if it is not present.

    A

    The type of value to retrieve.

    key

    The key for the value to retrieve.

    returns

    The value, if it is present in the map.

    Exceptions thrown

    scala.NoSuchElementException If the value isn't present in the map.

  3. abstract def contains(key: TypedKey[_]): Boolean

    Permalink

    Check if the map contains a value with the given key.

    Check if the map contains a value with the given key.

    key

    The key to check for.

    returns

    True if the value is present, false otherwise.

  4. abstract def get[A](key: TypedKey[A]): Option[A]

    Permalink

    Get a value from the map, returning None if it is not present.

    Get a value from the map, returning None if it is not present.

    A

    The type of value to retrieve.

    key

    The key for the value to retrieve.

    returns

    Some value, if it is present in the map, otherwise None.

  5. abstract def updated[A](key: TypedKey[A], value: A): TypedMap

    Permalink

    Update the map with the given key and value, returning a new instance of the map.

    Update the map with the given key and value, returning a new instance of the map.

    A

    The type of value.

    key

    The key to set.

    value

    The value to use.

    returns

    A new instance of the map with the new entry added.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def asJava: libs.typedmap.TypedMap

    Permalink

    returns

    The Java version for this map.

  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  11. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  12. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  13. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  14. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  15. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  16. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  17. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  18. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  19. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped