Returns a collector that outputs the average of all received numbers
Returns a collector that outputs the the amount of elements processed
Returns a collector that returns true if any value is received
Returns a collector that returns true if no value is received
Returns a collector that returns true if any received booleans is true
Returns a collector that outputs the product of all received numbers
Returns a collector that outputs a tuple containing the minimum and maximum value of the inputs.
Returns a collector that takes all elements of any type, converts them to a string, and concatenates them.
Returns a collector that takes all elements of any type, converts them to a string, and concatenates them in reverse order.
Returns a collector that outputs the sum of all received numbers
Returns a collector that takes the first element of the iterable, and then uses the result of the choice
function to decide
whether to keep the currently chosen value, or the new element.
the element type
a function taking two elements, and returning false to keep the first, and true to keep the second element
specifies how to deal with the potential case that the Iterable is empty. There are three cases:
f()
Returns a collector that returns true if any received element equals given elem
.
the input element type
Returns a collector that returns true if any of the received elements is contained the given elems
.
the input element type
Returns a collector that returns the element received at position index
.
If no such value is received, it tries to get an alternative value from otherwise
the input element type
specifies how to deal with the potential case that the Iterable is empty. There are three cases:
f()
Returns a collector that returns a Map with amount of occurances as keys, and the unique set of elements with that amount of occurrance as values
the element type
Returns a collector that outputs the first element it encounters that satisfies pred
.
If no value is found, it tries to get an alternative value from otherwise
the input element type
a predicate over elements Elem
specifies how to deal with the potential case that the Iterable is empty. There are three cases:
f()
Returns a collector that outputs the last element it encounters that satisfies pred
.
If no value is found, it tries to get an alternative value from otherwise
the input element type
a predicate over elements Elem
specifies how to deal with the potential case that the Iterable is empty. There are three cases:
f()
Returns a collector that returns the first element it receives.
If no value is received, it tries to get an alternative value from otherwise
the input element type
specifies how to deal with the potential case that the Iterable is empty. There are three cases:
f()
Returns a collector that creates a Dictionary using the given keyFun
to generate keys for received elements.
the dictionary key type
the dictionary value type
a function that takes an element V and returns its key K
Returns a collector that groups incoming value by given keyFun
, and uses the buildSeqOp
to create sequences of those values.
the dictionary key type
the dictionary value type
the result sequence type
a function that takes an element V and returns its key K
a collector that builds a structure from given elements Value
Returns a collector that creates a UniqueDictionary using the given keyFun
to generate keys for received elements.
the dictionary key type
the dictionary value type
a function that takes an element Value and returns its key Key
Returns a collector that creates a histogram of the received elements. That is, it creates a Map with the elements as keys and the amount of occurrances as values.
the element type
if undefined will return the histogram in value order, if value is 'TOP' it will order the histogram from highest to lowest, otherwise it will order the histogram from lowest to highest frequency.
if sortBy
is specified, this parameter limits the amount of results
Returns a collector that returns the last element it receives.
If no value is received, it tries to get an alternative value from otherwise
the input element type
specifies how to deal with the potential case that the Iterable is empty. There are three cases:
f()
Returns a collector that outputs the maximum of all received numbers
specifies how to deal with the potential case that the Iterable is empty. There are three cases:
f()
Returns a collector that performs the toNumber
function on each element, and returns the element for which the result
of toNumber
returned the maximum value.
the element type
a function taking an element an returning a number to compare
specifies how to deal with the potential case that the Iterable is empty. There are three cases:
f()
Returns a collector that outputs the minimum of all received numbers
specifies how to deal with the potential case that the Iterable is empty. There are three cases:
f()
Returns a collector that performs the toNumber
function on each element, and returns the element for which the result
of toNumber
returned the minimum value.
the element type
a function taking an element an returning a number to compare
specifies how to deal with the potential case that the Iterable is empty. There are three cases:
f()
Returns a collector that creates a tuple of element arrays based on the given pred
.
The first array are the elements that satisfy pred
, and the second array contains those that don't.
the element type
a predicate over elements Elem
Returns a collector that creates a tuple of structures build with buildSeqOp
based on the given pred
.
The first structure contains the elements that satisfy pred
, and the second structure contains those that don't.
the element type
a predicate over elements Elem
a collector that builds a structure from given elements Elem
Returns a collector that performs the toNumber
function on each element, and returns a tuple of the elements for which
the function returned the minumum and maximum values.
a function taking an element an returning a number to compare
Returns a collector that creates a tuple of element arrays where the first array contains the elements upto the given 'index', and the second array contains the other elements.
the element type
the index at which to start the second array
Returns a collector that creates a tuple of structures build by buildSeqOp
where the first structure contains the elements upto the given 'index', and the second structure contains the other elements.
the element type
the index at which to start the second array
Returns a collector that created a potentially reversed array from the input elements.
the element type
if true will prepend elements to the target instead of append
an optional existing array to which the elements will be added
Returns a collector that creates a Map from the received tuples of type [K, V].
Note: modifies the target
Map
the map key type
the map value type
the target Map
Returns a collector that takes tuple elements of [string, V] and returns an object with those keys and values. Note: mutates the target object
the value type
a target object to add the properties to
Returns a collector that creates a Set from the received elements.
Note: modifies the target
Set
the element type
the target Set
Generated using TypeDoc
Returns a collector that returns true if all received booleans are true
iter([true, false]).collect(Collectors.and) result: false