Packages

final class NonEmptyMap[K, V] extends AnyRef

A non-empty wrapper for the scala immutable map. Note - this does not attempt to implement all features of map but what the author considers to be the "normal ones".

Self Type
NonEmptyMap[K, V]
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. NonEmptyMap
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. def +(elem: (K, V)): NonEmptyMap[K, V]

    Creates a new NonEmptyMap with an additional element, unless the element is already present.

    Creates a new NonEmptyMap with an additional element, unless the element is already present.

    elem

    the element to be added

    returns

    a new map that contains all elements of this map and that also contains elem.

  4. def ++(elems: Iterable[(K, V)]): NonEmptyMap[K, V]

    Creates a new NonEmptyMap by adding all elements contained in another collection to this NonEmptyMap, omitting duplicates.

    Creates a new NonEmptyMap by adding all elements contained in another collection to this NonEmptyMap, omitting duplicates.

    This method takes a collection of elements and adds all elements, omitting duplicates, into NonEmptyMap.

    Example:

    scala> val a = NonEmptyMap(1, 2) ++ NonEmptyMap(2, "a")
    a: zio.prelude.NonEmptyMap[Any] = NonEmptyMap(1, 2, a)
    elems

    the collection containing the elements to add.

    returns

    a new NonEmptyMap with the given elements added, omitting duplicates.

  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. def add(elem: (K, V)): NonEmptyMap[K, V]

    Adds the elem to this NonEmptyMap.

    Adds the elem to this NonEmptyMap. Alias for +.

  7. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  8. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def equals(that: Any): Boolean
    Definition Classes
    NonEmptyMap → AnyRef → Any
  11. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  12. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. def hashCode(): Int
    Definition Classes
    NonEmptyMap → AnyRef → Any
  14. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  15. def keySet: NonEmptySet[K]
  16. def mapValues[V1](f: (V) => V1): NonEmptyMap[K, V1]

    Produces a new non empty map where values mapped according to function f.

    Produces a new non empty map where values mapped according to function f. For compatibility does not use map.iew

  17. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  20. def peel: ((K, V), Map[K, V])

    Returns an element of this NonEmptyMap and the remainder, which is a (possibly empty) Map.

    Returns an element of this NonEmptyMap and the remainder, which is a (possibly empty) Map.

    Annotations
    @inline()
  21. def peelNonEmpty: ((K, V), Option[NonEmptyMap[K, V]])

    Returns an element of this NonEmptyMap and the remainder or None, if the remainder is empty.

  22. def remove(elem: K): Map[K, V]

    Removes the elem from this NonEmptyMap.

    Removes the elem from this NonEmptyMap. Alias for -.

  23. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  24. def tailNonEmpty: Option[NonEmptyMap[K, V]]

    Returns the tail of this NonEmptyMap if it exists or None otherwise.

  25. def toMap: Map[K, V]

    Converts this NonEmptyMap to a Map.

  26. def toString(): String
    Definition Classes
    NonEmptyMap → AnyRef → Any
  27. def values: NonEmptyChunk[V]
  28. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  29. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  30. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped