object IterableUtil
- Alphabetic
- By Inheritance
- IterableUtil
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def assertAtMostOne[T](objects: Seq[T], objName: String)(implicit loggingContext: ErrorLoggingContext): Option[T]
- Exceptions thrown
java.lang.IllegalArgumentException
Ifobjects
contains more than one distinct element
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def mapReducePar[A, B](parallelism: PositiveNumeric[Int], xs: Seq[A])(f: (A) => B)(g: (B, B) => B)(implicit ec: ExecutionContext): Future[Option[B]]
Map the function
f
over a sequence and reduce the result with functiong
, mapping and reducing is done in parallel given the desiredparallelism
.Map the function
f
over a sequence and reduce the result with functiong
, mapping and reducing is done in parallel given the desiredparallelism
.This method works best if the amount of work for computing
f
andg
is roughly constant-time, i.e., independent of the data that is being processed, because then each chunk to process takes about the same time.- parallelism
Determines the number of chunks that are created for parallel processing.
- f
The mapping function.
- g
The reducing function. Must be associative.
- returns
The result of
xs.map(f).reduceOption(g)
. Iff
org
throw exceptions, the returned future contains such an exception, but it is not guaranteed that the returned exception is the "first" such exception in a fixed sequential execution order.
- Annotations
- @SuppressWarnings()
- def maxList[A](xs: Iterable[A])(implicit order: Ordering[A]): List[A]
Calculates the largest possible list ys of elements in an input iterable xs such that: For all y in ys.
Calculates the largest possible list ys of elements in an input iterable xs such that: For all y in ys. y >= x for all x in xs.
Informally, this gives the list of all highest elements of
xs
.See
TraversableUtilTest
for an example. - def minList[A](xs: Iterable[A])(implicit order: Ordering[A]): List[A]
Calculates the largest possible list ys of elements in an input iterable xs such that: For all y in ys.
Calculates the largest possible list ys of elements in an input iterable xs such that: For all y in ys. y <= x for all x in xs.
Informally, this gives the list of all lowest elements of
xs
. - final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- def spansBy[A, CC[X] <: Iterable[X], C, B](iterable: IterableOps[A, CC, C with Iterable[A]])(f: (A) => B): LazyList[(B, NonEmpty[CC[A]])]
Split an iterable into a lazy Stream of consecutive elements with the same value of
f(element)
. - def subzipBy[A, B, C](elems: Iterator[A], seq: Iterator[B])(by: (A, B) => Option[C]): Seq[C]
Returns the zipping of
elems
withseq
where membersy
ofseq
are skipped if!by(x, y)
for the current memberx
fromelems
.Returns the zipping of
elems
withseq
where membersy
ofseq
are skipped if!by(x, y)
for the current memberx
fromelems
. Zipping stops when there are no more elements inelems
orseq
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- 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()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- def zipAllOption[A, B](xs: Seq[A], ys: Iterable[B]): Seq[(Option[A], Option[B])]