NEMap

izumi.fundamentals.collections.nonempty.NEMap
See theNEMap companion class
object NEMap

Companion object for class NEMap.

Attributes

Companion
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
NEMap.type

Members list

Type members

Classlikes

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

Attributes

Supertypes
class AnyVal
trait Matchable
class Any

Value members

Concrete methods

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

Constructs a new NEMap given at least one element.

Constructs a new NEMap given at least one element.

Type parameters

K

the type of the key contained in the new NEMap

V

the type of the value contained in the new NEMap

Value parameters

firstElement

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

otherElements

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

Attributes

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

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

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

Type parameters

K

the type of the key contained in the new NEMap

V

the type of the value contained in the new NEMap

Value parameters

seq

the Seq with which to construct a NEMap

Attributes

Returns

a NEMap 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[NEMap[K, V]]
def from[K, V](map: Map[K, V]): Option[NEMap[K, V]]
def unapplySeq[K, V](NEMap: NEMap[K, V]): Some[Seq[(K, V)]]

Variable argument extractor for NEMaps.

Variable argument extractor for NEMaps.

Type parameters

K

the type of the key contained in the NEMap

V

the type of the value contained in the NEMap

Value parameters

NEMap:

the NEMap containing the elements to extract

Attributes

Returns

an Seq containing this NEMaps elements, wrapped in a Some

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

Implicits

Implicits

final implicit def OptionOps[K, V](option: Option[NEMap[K, V]]): OptionOps[K, V]
implicit def asIterable[K, V](ne: NEMap[K, V]): Iterable[(K, V)]