Packages

c

cats.data

NonEmptyMapOps

sealed class NonEmptyMapOps[K, A] extends AnyRef

Source
NonEmptyMapImpl.scala
Linear Supertypes
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. NonEmptyMapOps
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new NonEmptyMapOps(value: NonEmptyMap[K, A])

Value Members

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

    Alias for concat

  4. def -(key: K): SortedMap[K, A]

    Removes a key from this map, returning a new SortedMap.

  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. 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.

  7. def add(ka: (K, A)): NonEmptyMap[K, A]

    Adds a key-value pair to this map, returning a new NonEmptyMap.

  8. def apply(key: K): Option[A]

    Alias for lookup

  9. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  10. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @IntrinsicCandidate()
  11. def concat(as: NonEmptyMap[K, A]): NonEmptyMap[K, A]

    Appends this NEM to another NEM, producing a new NonEmptyMap.

  12. def contains(key: K): Boolean

    Checks whether this map contains a binding for the given key.

  13. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  15. def exists(f: (A) ⇒ Boolean): Boolean

    Tests whether a predicate holds for at least one element of this map.

  16. def filter(p: (A) ⇒ Boolean): SortedMap[K, A]

    Filters all elements of this map that do not satisfy the given predicate.

  17. def filterNot(p: (A) ⇒ Boolean): SortedMap[K, A]

    Filters all elements of this map that satisfy the given predicate.

  18. def find(f: (A) ⇒ Boolean): Option[(K, A)]

    Returns the first value along with its key, that matches the given predicate.

  19. def foldLeft[B](b: B)(f: (B, A) ⇒ B): B

    Left-associative fold using f.

  20. def foldRight[B](lb: Eval[B])(f: (A, Eval[B]) ⇒ Eval[B]): Eval[B]

    Right-associative fold using f.

  21. def forall(p: (A) ⇒ Boolean): Boolean

    Tests whether a predicate holds for all elements of this map.

  22. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  23. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  24. def head: (K, A)

    Returns the first key-value pair of this map.

  25. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  26. def keys: NonEmptySet[K]

    Returns a SortedSet containing all the keys of this map.

  27. def last: (K, A)

    Returns the last key-value pair of this map.

  28. def length: Int

    Returns the amount of key-value pars in this map.

  29. def lookup(k: K): Option[A]

    Optionally returns the value associated with the given key.

  30. def map[B](f: (A) ⇒ B): NonEmptyMap[K, B]

    Applies f to all the elements

  31. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  32. 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.

  33. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  34. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  35. def reduce(implicit S: kernel.Semigroup[A]): A

    Reduce using the Semigroup of A

  36. def reduceLeft(f: (A, A) ⇒ A): A

    Left-associative reduce using f.

  37. def reduceLeftTo[B](f: (A) ⇒ B)(g: (B, A) ⇒ B): B

    Apply f to the "initial element" of fa and combine it with every other value using the given function g.

  38. def reduceRight(f: (A, Eval[A]) ⇒ Eval[A]): Eval[A]

    Right-associative reduce using f.

  39. 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 function g.

  40. 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.

  41. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  42. def tail: SortedMap[K, A]

    Returns all the key-value pairs, except for the first.

  43. def toNel: NonEmptyList[(K, A)]

    Returns a non empty list of map contents, similarly to Map#toList

  44. def toSortedMap: SortedMap[K, A]

    Converts this map to a SortedMap.

  45. def toString(): String
    Definition Classes
    AnyRef → Any
  46. 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.

  47. val value: NonEmptyMap[K, A]
  48. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  49. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  50. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated
    Deprecated

Inherited from AnyRef

Inherited from Any

Ungrouped