final class UnorderedFoldableOps[F[_], A] extends AnyVal
- Alphabetic
- By Inheritance
- UnorderedFoldableOps
- AnyVal
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new UnorderedFoldableOps(fa: F[A])
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
##(): Int
- Definition Classes
- Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
count(p: (A) ⇒ Boolean)(implicit F: UnorderedFoldable[F]): Long
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.implicits._ scala> val map1 = Map[Int, String]() scala> val p1: String => Boolean = _.length > 0 scala> map1.count(p1) res0: Long = 0 scala> val map2 = Map(1 -> "hello", 2 -> "world", 3 -> "!") scala> val p2: String => Boolean = _.length > 1 scala> map2.count(p2) res1: Long = 2
-
def
getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
toString(): String
- Definition Classes
- Any