← ZIO Prelude docs

NonEmptySortedMap

zio.prelude.NonEmptySortedMap
See theNonEmptySortedMap companion class

Attributes

Companion
class
Source
NonEmptySortedMap.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def apply[K, V](elem: (K, V), others: Iterable[(K, V)])(implicit sOrdering: Ordering[K]): NonEmptySortedMap[K, V]

Attributes

Source
NonEmptySortedMap.scala
def apply[K, V](elem: (K, V), others: (K, V)*)(implicit sOrdering: Ordering[K]): NonEmptySortedMap[K, V]

Creates a NonEmptySortedMap with the specified elements.

Creates a NonEmptySortedMap with the specified elements.

Type parameters

A

the type of the NonEmptySortedMap's elements

Value parameters

elem

an element of the created NonEmptySortedMap

others

the remaining elements of the created NonEmptySortedMap

Attributes

Returns

a new NonEmptySortedMap with elements elem and others

Source
NonEmptySortedMap.scala
def fromIterableOption[K, V](iterable: Iterable[(K, V)])(implicit sOrdering: Ordering[K]): Option[NonEmptySortedMap[K, V]]

Constructs a NonEmptySortedMap from an Iterable or None otherwise.

Constructs a NonEmptySortedMap from an Iterable or None otherwise.

Attributes

Source
NonEmptySortedMap.scala
def fromMap[K, V](elem: (K, V), others: SortedMap[K, V])(implicit sOrdering: Ordering[K]): NonEmptySortedMap[K, V]

Constructs a NonEmptySortedMap from an element and SortedMap.

Constructs a NonEmptySortedMap from an element and SortedMap.

Attributes

Source
NonEmptySortedMap.scala
def fromMapOption[K, V](map: SortedMap[K, V])(implicit sOrdering: Ordering[K]): Option[NonEmptySortedMap[K, V]]

Constructs a NonEmptySortedMap from a SortedMap or None otherwise.

Constructs a NonEmptySortedMap from a SortedMap or None otherwise.

Attributes

Source
NonEmptySortedMap.scala
def fromNonEmptyChunk[K, V](elems: NonEmptyChunk[(K, V)])(implicit sOrdering: Ordering[K]): NonEmptySortedMap[K, V]

Constructs a NonEmptySortedMap from a NonEmptyChunk.

Constructs a NonEmptySortedMap from a NonEmptyChunk.

Attributes

Source
NonEmptySortedMap.scala
def fromNonEmptyList[K, V](elems: NonEmptyList[(K, V)])(implicit sOrdering: Ordering[K]): NonEmptySortedMap[K, V]

Constructs a NonEmptySortedMap from a NonEmptyList.

Constructs a NonEmptySortedMap from a NonEmptyList.

Attributes

Source
NonEmptySortedMap.scala
def single[K, V](head: (K, V))(implicit sOrdering: Ordering[K]): NonEmptySortedMap[K, V]

Constructs a NonEmptySortedMap with the specified single value.

Constructs a NonEmptySortedMap with the specified single value.

Attributes

Source
NonEmptySortedMap.scala
def unapply[K, V](arg: NonEmptySortedMap[K, V]): Some[((K, V), SortedMap[K, V])]

Attributes

Source
NonEmptySortedMap.scala

Implicits

Implicits

implicit def toMap[K, V](nonEmptyMap: NonEmptySortedMap[K, V]): SortedMap[K, V]

Provides an implicit conversion from NonEmptySortedMap to the SortedMap for interoperability with Scala's collection library.

Provides an implicit conversion from NonEmptySortedMap to the SortedMap for interoperability with Scala's collection library.

Attributes

Source
NonEmptySortedMap.scala