MinimalPartialOrderedSetProxy
We test all default methods against this proxy so overrides can never change semantics
Attributes
- Source
- PartiallyOrderedSetLaws.scala
- Graph
-
- Supertypes
-
trait PartiallyOrderedSet[F]trait UnorderedFoldable[F]trait Serializableclass Objecttrait Matchableclass AnyShow all
Members list
Value members
Concrete methods
Add an item to fa
use the heap property to be more efficient than toSortedList to check containment
use the heap property to be more efficient than toSortedList to check containment
Attributes
return an empty F
Get the minimum value from fa if not empty
Remove the minimum value if fa is not empty, else return empty
Remove the minimum value if fa is not empty, else return empty
Attributes
make an f with a single item
Attributes
Inherited methods
Attributes
- Inherited from:
- PartiallyOrderedSet
- Source
- PartiallyOrderedSet.scala
same as items.foldLeft(fa)(addIfLarger(_, count, _))
same as items.foldLeft(fa)(addIfLarger(_, count, _))
Attributes
- Inherited from:
- PartiallyOrderedSet
- Source
- PartiallyOrderedSet.scala
same as takeLargest(add(fa, item), maxSize)
same as takeLargest(add(fa, item), maxSize)
Attributes
- Inherited from:
- PartiallyOrderedSet
- Source
- PartiallyOrderedSet.scala
build an F from Iterable
build an F from Iterable
Attributes
- Inherited from:
- PartiallyOrderedSet
- Source
- PartiallyOrderedSet.scala
Tests if fa
contains v
using the Eq
instance for A
Tests if fa
contains v
using the Eq
instance for A
Attributes
- Inherited from:
- UnorderedFoldable
- Source
- UnorderedFoldable.scala
Count the number of elements in the structure that satisfy the given predicate.
Count the number of elements in the structure that satisfy the given predicate.
For example:
scala> import cats.syntax.all._
scala> val map1 = Map[Int, String]()
scala> val p1: String => Boolean = _.length > 0
scala> UnorderedFoldable[Map[Int, *]].count(map1)(p1)
res0: Long = 0
scala> val map2 = Map(1 -> "hello", 2 -> "world", 3 -> "!")
scala> val p2: String => Boolean = _.length > 1
scala> UnorderedFoldable[Map[Int, *]].count(map2)(p2)
res1: Long = 2
Attributes
- Inherited from:
- UnorderedFoldable
- Source
- UnorderedFoldable.scala
Check whether at least one element satisfies the predicate.
Check whether at least one element satisfies the predicate.
If there are no elements, the result is false
.
Attributes
- Inherited from:
- UnorderedFoldable
- Source
- UnorderedFoldable.scala
Check whether all elements satisfy the predicate.
Check whether all elements satisfy the predicate.
If there are no elements, the result is true
.
Attributes
- Inherited from:
- UnorderedFoldable
- Source
- UnorderedFoldable.scala
Returns true if there are no elements.
Returns true if there are no elements. Otherwise false.
Attributes
- Inherited from:
- UnorderedFoldable
- Source
- UnorderedFoldable.scala
Attributes
- Inherited from:
- UnorderedFoldable
- Source
- UnorderedFoldable.scala
Given an Order[A] we can always make an Order[F[A]]
Given an Order[A] we can always make an Order[F[A]]
Attributes
- Inherited from:
- PartiallyOrderedSet
- Source
- PartiallyOrderedSet.scala
Same as get the minimimumOption and removinging the minimum
Same as get the minimimumOption and removinging the minimum
Attributes
- Inherited from:
- PartiallyOrderedSet
- Source
- PartiallyOrderedSet.scala
The size of this UnorderedFoldable.
The size of this UnorderedFoldable.
This is overridden in structures that have more efficient size implementations (e.g. Vector, Set, Map).
Note: will not terminate for infinite-sized collections.
Attributes
- Inherited from:
- UnorderedFoldable
- Source
- UnorderedFoldable.scala
fold in order
remove as many as needed until size <= maxSize
remove as many as needed until size <= maxSize
Attributes
- Inherited from:
- PartiallyOrderedSet
- Source
- PartiallyOrderedSet.scala
return a sorted list of all items in fa
return a sorted list of all items in fa
Attributes
- Inherited from:
- PartiallyOrderedSet
- Source
- PartiallyOrderedSet.scala
Attributes
- Inherited from:
- UnorderedFoldable
- Source
- UnorderedFoldable.scala
Deprecated and Inherited methods
Same as get the minimimumOption and removinging the minimum
Same as get the minimimumOption and removinging the minimum
Attributes
- Deprecated
- true
- Inherited from:
- PartiallyOrderedSet
- Source
- PartiallyOrderedSet.scala