IterableConcat

See javadoc - uk.gov.gchq.koryphe.impl.function.IterableConcat

Available since Koryphe version 1.1.0

For a given Iterable of Iterables, an IterableConcat will essentially perform a FlatMap on the input, by concatenating each of the nested iterables into a single flattened iterable.

Examples

Concatenate nested iterables

Java
JSON
Full JSON
Python
final IterableConcat<Integer> function = new IterableConcat<>();
{
  "class" : "IterableConcat"
}
{
  "class" : "uk.gov.gchq.koryphe.impl.function.IterableConcat"
}
g.IterableConcat()

Input type:

java.lang.Iterable

Example inputs:

Input TypeInputResult TypeResult
java.util.ArrayList[[2, 3, 5], [7, 11, 13], [17, 19, 23]]uk.gov.gchq.koryphe.util.IterableUtil$ChainedIterable[2, 3, 5, 7, 11, 13, 17, 19, 23]
java.util.ArrayList[[29, 31, 37]]uk.gov.gchq.koryphe.util.IterableUtil$ChainedIterable[29, 31, 37]
java.util.ArrayList[[2, 3, 5], [7, 11, 13], null]NullPointerException: null
nullIllegalArgumentException: iterables are required

results matching ""

    No results matching ""