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.IllegalArgumentExceptionIfobjectscontains more than one distinct element
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
- 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
- @IntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- 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
fover a sequence and reduce the result with functiong, mapping and reducing is done in parallel given the desiredparallelism.Map the function
fover 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
fandgis 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). Ifforgthrow 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
TraversableUtilTestfor 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
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- 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 splitAfter[A, CC[X] <: Iterable[X], C, B](xs: IterableOps[A, CC, C with Iterable[A]])(p: (A) => Boolean): LazyList[NonEmpty[CC[A]]]
Splits the sequence
xsafter each element that satisfiespand returns the sequence of chunks - def subzipBy[A, B, C](elems: Iterator[A], seq: Iterator[B])(by: (A, B) => Option[C]): Seq[C]
Returns the zipping of
elemswithseqwhere membersyofseqare skipped if!by(x, y)for the current memberxfromelems.Returns the zipping of
elemswithseqwhere membersyofseqare skipped if!by(x, y)for the current memberxfromelems. Zipping stops when there are no more elements inelemsorseq - 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])
- 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])]