NonEmptyMap

izumi.fundamentals.collections.nonempty.NonEmptyMap$
See theNonEmptyMap companion class

Companion object for class NonEmptyMap.

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Concise view

Type members

Classlikes

final implicit class OptionOps[K, +V](option: Option[NonEmptyMap[K, V]]) extends AnyVal

Attributes

Graph
Supertypes
class AnyVal
trait Matchable
class Any

Value members

Concrete methods

def apply[K, V](firstElement: (K, V), otherElements: (K, V)*): NonEmptyMap[K, V]

Constructs a new NonEmptyMap given at least one element.

Constructs a new NonEmptyMap given at least one element.

Attributes

K

the type of the key contained in the new NonEmptyMap

V

the type of the value contained in the new NonEmptyMap

firstElement

the first element (with index 0) contained in this NonEmptyMap

otherElements

a varargs of zero or more other elements (with index 1, 2, 3, ...) contained in this NonEmptyMap

def from[K, V](seq: Seq[(K, V)]): Option[NonEmptyMap[K, V]]

Optionally construct a NonEmptyMap containing the elements, if any, of a given Seq.

Optionally construct a NonEmptyMap containing the elements, if any, of a given Seq.

Attributes

K

the type of the key contained in the new NonEmptyMap

V

the type of the value contained in the new NonEmptyMap

seq

the Seq with which to construct a NonEmptyMap

Returns:

a NonEmptyMap containing the elements of the given Seq, if non-empty, wrapped in a Some; else None if the Seq is empty

def from[K, V](map: Map[K, V]): Option[NonEmptyMap[K, V]]
def from[K, V](map: Map[K, V]): Option[NonEmptyMap[K, V]]
def unapplySeq[K, V](nonEmptyMap: NonEmptyMap[K, V]): Some[Seq[(K, V)]]

Variable argument extractor for NonEmptyMaps.

Variable argument extractor for NonEmptyMaps.

Attributes

K

the type of the key contained in the NonEmptyMap

V

the type of the value contained in the NonEmptyMap

nonEmptyMap:

the NonEmptyMap containing the elements to extract

Returns:

an Seq containing this NonEmptyMaps elements, wrapped in a Some

def unsafeFrom[K, V](set: Map[K, V]): NonEmptyMap[K, V]

Implicits

Implicits

final implicit def OptionOps[K, V](option: Option[NonEmptyMap[K, V]]): OptionOps[K, V]