Contains factory methods to build Accumulators.
Note that the Accumulator object itself is not a factory, but it is implicitly convert to a factory according to the element type, see Accumulator.toFactory.
This allows passing the Accumulator object as argument when a collection.Factory, and the implicit Accumulator.AccumulatorFactoryShape instance is used to build a specialized Accumulator according to the element type:
scala> val intAcc = Accumulator(1,2,3)
intAcc: scala.collection.convert.IntAccumulator = IntAccumulator(1, 2, 3)
scala> val anyAccc = Accumulator("K")
anyAccc: scala.collection.convert.AnyAccumulator[String] = AnyAccumulator(K)
scala> val intAcc2 = List(1,2,3).to(Accumulator)
intAcc2: scala.jdk.IntAccumulator = IntAccumulator(1, 2, 3)
scala> val anyAcc2 = List("K").to(Accumulator)
anyAcc2: scala.jdk.AnyAccumulator[String] = AnyAccumulator(K)
| Supertypes | |
|---|---|
| Self type |
| Companion | class |
|---|
An implicit AccumulatorFactoryShape is used in Accumulator factory method to return specialized variants according to the element type.
| Companion | object |
|---|
Creates an Accumulator with the specified elements.
| Type parameters |
|
|---|---|
| Value parameters |
|
| Returns | a new Accumulator with elements |
Concatenates all argument collections into a single Accumulator.
| Value parameters |
|
|---|---|
| Returns | the concatenation of all the collections. |
An empty collection
| Type parameters |
|
|---|
Produces an Accumulator containing the results of some element computation a number of times.
| Value parameters |
|
|---|---|
| Returns | An Accumulator that contains the results of |
Produces a two-dimensional Accumulator containing the results of some element computation a number of times.
| Value parameters |
|
|---|---|
| Returns | An Accumulator that contains the results of |
Produces a three-dimensional Accumulator containing the results of some element computation a number of times.
| Value parameters |
|
|---|---|
| Returns | An Accumulator that contains the results of |
Produces a four-dimensional Accumulator containing the results of some element computation a number of times.
| Value parameters |
|
|---|---|
| Returns | An Accumulator that contains the results of |
Produces a five-dimensional Accumulator containing the results of some element computation a number of times.
| Value parameters |
|
|---|---|
| Returns | An Accumulator that contains the results of |
Creates a target Accumulator from an existing source collection
| Type parameters |
|
|---|---|
| Value parameters |
|
| Returns | a new Accumulator with the elements of |
Produces an Accumulator containing repeated applications of a function to a start value.
| Value parameters |
|
|---|---|
| Returns | an Accumulator with |
| Type parameters |
|
|---|---|
| Returns | A builder for |
Produces an Accumulator containing a sequence of increasing of integers.
| Value parameters |
|
|---|---|
| Returns | an Accumulator with values |
Produces an Accumulator containing equally spaced values in some integer interval.
| Value parameters |
|
|---|---|
| Returns | an Accumulator with values |
Produces an Accumulator containing values of a given function over a range of integer values starting from 0.
| Value parameters |
|
|---|---|
| Returns | An Accumulator consisting of elements |
Produces a two-dimensional Accumulator containing values of a given function over ranges of integer values starting from 0.
| Value parameters |
|
|---|---|
| Returns | An Accumulator consisting of elements |
Produces a three-dimensional Accumulator containing values of a given function over ranges of integer values starting from 0.
| Value parameters |
|
|---|---|
| Returns | An Accumulator consisting of elements |
Produces a four-dimensional Accumulator containing values of a given function over ranges of integer values starting from 0.
| Value parameters |
|
|---|---|
| Returns | An Accumulator consisting of elements |
Produces a five-dimensional Accumulator containing values of a given function over ranges of integer values starting from 0.
| Value parameters |
|
|---|---|
| Returns | An Accumulator consisting of elements |
Produces an Accumulator that uses a function f to produce elements of type A and update an internal state of type S.
| Type parameters |
|
|---|---|
| Value parameters |
|
| Returns | an Accumulator that produces elements using |
© 2002-2022 EPFL, with contributions from Lightbend.
Licensed under the Apache License, Version 2.0.
https://scala-lang.org/api/3.2.0/scala/jdk/Accumulator$.html