sealed class NonEmptyMapOps[K, A] extends AnyRef
- Alphabetic
- By Inheritance
- NonEmptyMapOps
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new NonEmptyMapOps(value: NonEmptyMap[K, A])
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- def ++(as: NonEmptyMap[K, A]): NonEmptyMap[K, A]
Alias for concat
- def -(key: K): SortedMap[K, A]
Removes a key from this map, returning a new SortedMap.
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def ===(that: NonEmptyMap[K, A])(implicit A: kernel.Eq[A]): Boolean
Typesafe equality operator.
Typesafe equality operator.
This method is similar to == except that it only allows two NonEmptySet[A] values to be compared to each other, and uses equality provided by Eq[_] instances, rather than using the universal equality provided by .equals.
- def add(ka: (K, A)): NonEmptyMap[K, A]
Adds a key-value pair to this map, returning a new
NonEmptyMap
. - def apply(key: K): Option[A]
Alias for lookup
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def concat(as: NonEmptyMap[K, A]): NonEmptyMap[K, A]
Appends this NEM to another NEM, producing a new
NonEmptyMap
. - def contains(key: K): Boolean
Checks whether this map contains a binding for the given key.
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def exists(f: (A) => Boolean): Boolean
Tests whether a predicate holds for at least one element of this map.
- def filter(p: (A) => Boolean): SortedMap[K, A]
Filters all elements of this map that do not satisfy the given predicate.
- def filterNot(p: (A) => Boolean): SortedMap[K, A]
Filters all elements of this map that satisfy the given predicate.
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def find(f: (A) => Boolean): Option[(K, A)]
Returns the first value along with its key, that matches the given predicate.
- def foldLeft[B](b: B)(f: (B, A) => B): B
Left-associative fold using f.
- def foldRight[B](lb: Eval[B])(f: (A, Eval[B]) => Eval[B]): Eval[B]
Right-associative fold using f.
- def forall(p: (A) => Boolean): Boolean
Tests whether a predicate holds for all elements of this map.
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def head: (K, A)
Returns the first key-value pair of this map.
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def keys: NonEmptySet[K]
Returns a
SortedSet
containing all the keys of this map. - def last: (K, A)
Returns the last key-value pair of this map.
- def length: Int
Returns the amount of key-value pars in this map.
- def lookup(k: K): Option[A]
Optionally returns the value associated with the given key.
- def map[B](f: (A) => B): NonEmptyMap[K, B]
Applies f to all the elements
- def mapBoth[L, B](f: (K, A) => (L, B))(implicit orderL: kernel.Order[L]): NonEmptyMap[L, B]
Applies f to both keys and elements simultaneously.
- def mapKeys[L](f: (K) => L)(implicit orderL: kernel.Order[L]): NonEmptyMap[L, A]
Applies f to all the keys leaving elements unchanged.
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def nonEmptyTraverse[G[_], B](f: (A) => G[B])(implicit G: Apply[G]): G[NonEmptyMap[K, B]]
Given a function which returns a G effect, thread this effect through the running of this function on all the values in this map, returning an NonEmptyMap[K, B] in a G context.
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def reduce(implicit S: kernel.Semigroup[A]): A
Reduce using the Semigroup of A
- def reduceLeft(f: (A, A) => A): A
Left-associative reduce using f.
- def reduceLeftTo[B](f: (A) => B)(g: (B, A) => B): B
Apply
f
to the "initial element" offa
and combine it with every other value using the given functiong
. - def reduceRight(f: (A, Eval[A]) => Eval[A]): Eval[A]
Right-associative reduce using f.
- def reduceRightTo[B](f: (A) => B)(g: (A, Eval[B]) => Eval[B]): Eval[B]
Apply
f
to the "initial element" of this map and lazily combine it with every other value using the given functiong
. - def show(implicit A: Show[A], K: Show[K]): String
Typesafe stringification method.
Typesafe stringification method.
This method is similar to .toString except that it stringifies values according to Show[_] instances, rather than using the universal .toString method.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def tail: SortedMap[K, A]
Returns all the key-value pairs, except for the first.
- def toNel: NonEmptyList[(K, A)]
Returns a non empty list of map contents, similarly to Map#toList
- def toSortedMap: SortedMap[K, A]
Converts this map to a
SortedMap
. - def toString(): String
- Definition Classes
- AnyRef → Any
- def transform[B](f: (K, A) => B): NonEmptyMap[K, B]
Transforms the elements only by applying f to both elements and associated keys.
- def updateWith(k: K)(f: (A) => A): NonEmptyMap[K, A]
Applies f to the value stored at k.
Applies f to the value stored at k. If lookup misses, does nothing.
- val value: NonEmptyMap[K, A]
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()