public class BikeyCollectors
extends java.lang.Object
Constructor and Description |
---|
BikeyCollectors() |
Modifier and Type | Method and Description |
---|---|
static <T,R,C,U> java.util.stream.Collector<T,?,BikeyMap<R,C,U>> |
toMap(java.util.function.Function<? super T,? extends Bikey<R,C>> keyMapper,
java.util.function.Function<? super T,? extends U> valueMapper)
Returns a
Collector that accumulates elements into a
BikeyMap whose keys and values are the result of applying the
provided mapping functions to the input elements. |
static <T,R,C,U> java.util.stream.Collector<T,?,BikeyMap<R,C,U>> |
toMap(java.util.function.Function<? super T,? extends Bikey<R,C>> keyMapper,
java.util.function.Function<? super T,? extends U> valueMapper,
java.util.function.BinaryOperator<U> mergeFunction)
Returns a
Collector that accumulates elements into a
BikeyMap whose keys and values are the result of applying the
provided mapping functions to the input elements. |
static <T,R,C,U,M extends BikeyMap<R,C,U>> |
toMap(java.util.function.Function<? super T,? extends Bikey<R,C>> keyMapper,
java.util.function.Function<? super T,? extends U> valueMapper,
java.util.function.BinaryOperator<U> mergeFunction,
java.util.function.Supplier<M> mapSupplier)
Returns a
Collector that accumulates elements into a
BikeyMap whose keys and values are the result of applying the
provided mapping functions to the input elements. |
static <T,R,C,U,M extends BikeyMap<R,C,U>> |
toMap(java.util.function.Function<? super T,? extends Bikey<R,C>> keyMapper,
java.util.function.Function<? super T,? extends U> valueMapper,
java.util.function.Supplier<M> mapSupplier)
Returns a
Collector that accumulates elements into a
BikeyMap whose keys and values are the result of applying the
provided mapping functions to the input elements. |
static <T,R,C,U> java.util.stream.Collector<T,?,BikeyMap<R,C,U>> |
toMap(java.util.function.Function<? super T,? extends R> rowKeyMapper,
java.util.function.Function<? super T,? extends C> columnKeyMapper,
java.util.function.Function<? super T,? extends U> valueMapper)
Returns a
Collector that accumulates elements into a
BikeyMap whose keys and values are the result of applying the
provided mapping functions to the input elements. |
static <T,R,C,U> java.util.stream.Collector<T,?,BikeyMap<R,C,U>> |
toMap(java.util.function.Function<? super T,? extends R> rowKeyMapper,
java.util.function.Function<? super T,? extends C> columnKeyMapper,
java.util.function.Function<? super T,? extends U> valueMapper,
java.util.function.BinaryOperator<U> mergeFunction)
Returns a
Collector that accumulates elements into a
BikeyMap whose keys and values are the result of applying the
provided mapping functions to the input elements. |
static <T,R,C,U,M extends BikeyMap<R,C,U>> |
toMap(java.util.function.Function<? super T,? extends R> rowKeyMapper,
java.util.function.Function<? super T,? extends C> columnKeyMapper,
java.util.function.Function<? super T,? extends U> valueMapper,
java.util.function.BinaryOperator<U> mergeFunction,
java.util.function.Supplier<M> mapSupplier)
Returns a
Collector that accumulates elements into a
BikeyMap whose keys and values are the result of applying the
provided mapping functions to the input elements. |
static <T,R,C,U,M extends BikeyMap<R,C,U>> |
toMap(java.util.function.Function<? super T,? extends R> rowKeyMapper,
java.util.function.Function<? super T,? extends C> columnKeyMapper,
java.util.function.Function<? super T,? extends U> valueMapper,
java.util.function.Supplier<M> mapSupplier)
Returns a
Collector that accumulates elements into a
BikeyMap whose keys and values are the result of applying the
provided mapping functions to the input elements. |
static <R,C> java.util.stream.Collector<Bikey<R,C>,?,BikeySet<R,C>> |
toSet()
Returns a
Collector that accumulates the input elements into a
new BikeySet . |
public static <R,C> java.util.stream.Collector<Bikey<R,C>,?,BikeySet<R,C>> toSet()
Collector
that accumulates the input elements into a
new BikeySet
.R
- row key type of the bikeysC
- column key type of the bikeysCollector
which collects all the input elements into a
BikeySet
public static <T,R,C,U> java.util.stream.Collector<T,?,BikeyMap<R,C,U>> toMap(java.util.function.Function<? super T,? extends Bikey<R,C>> keyMapper, java.util.function.Function<? super T,? extends U> valueMapper)
Collector
that accumulates elements into a
BikeyMap
whose keys and values are the result of applying the
provided mapping functions to the input elements.
If the mapped bikey (row and column) contains duplicates (according to
Object.equals(Object)
), the value mapping function is applied to
each equal element, and the results are merged using the provided merging
function.
The returned Collector
is not concurrent and doesn't support
parallel stream pipelines.
T
- the type of the input elementsR
- row key type of the map keysC
- column key type of the map keysU
- the output type of the value mapping functionkeyMapper
- a mapping function to produce bikeysvalueMapper
- a mapping function to produce valuesCollector
which collects elements into a
BikeMap
whose keys are the result of applying a key
mapping function to the input elements.toMap(Function, Function, BinaryOperator)
,
toMap(Function, Function, Supplier)
,
toMap(Function, Function, BinaryOperator, Supplier)
public static <T,R,C,U> java.util.stream.Collector<T,?,BikeyMap<R,C,U>> toMap(java.util.function.Function<? super T,? extends R> rowKeyMapper, java.util.function.Function<? super T,? extends C> columnKeyMapper, java.util.function.Function<? super T,? extends U> valueMapper)
Collector
that accumulates elements into a
BikeyMap
whose keys and values are the result of applying the
provided mapping functions to the input elements.
If the mapped bikey (row and column) contains duplicates (according to
Object.equals(Object)
), the value mapping function is applied to
each equal element, and the results are merged using the provided merging
function.
The returned Collector
is not concurrent and doesn't support
parallel stream pipelines.
T
- the type of the input elementsR
- row key type of the map keysC
- column key type of the map keysU
- the output type of the value mapping functionrowKeyMapper
- a mapping function to produce row keycolumnKeyMapper
- a mapping function to produce column keyvalueMapper
- a mapping function to produce valuesCollector
which collects elements into a
BikeMap
whose keys are the result of applying a key
mapping function to the input elements.toMap(Function, Function, Function, BinaryOperator)
,
toMap(Function, Function, Function, Supplier)
,
toMap(Function, Function, Function, BinaryOperator, Supplier)
public static <T,R,C,U,M extends BikeyMap<R,C,U>> java.util.stream.Collector<T,?,M> toMap(java.util.function.Function<? super T,? extends Bikey<R,C>> keyMapper, java.util.function.Function<? super T,? extends U> valueMapper, java.util.function.Supplier<M> mapSupplier)
Collector
that accumulates elements into a
BikeyMap
whose keys and values are the result of applying the
provided mapping functions to the input elements.
If the mapped bikey (row and column) contains duplicates (according to
Object.equals(Object)
), the value mapping function is applied to
each equal element, and the results are merged using the provided merging
function.
The returned Collector
is not concurrent and doesn't support
parallel stream pipelines.
T
- the type of the input elementsR
- row key type of the map keysC
- column key type of the map keysU
- the output type of the value mapping functionM
- the type of the resulting BikeMap
keyMapper
- a mapping function to produce bikeysvalueMapper
- a mapping function to produce valuesmapSupplier
- a function which returns a new, empty BikeyMap
into
which the results will be insertedCollector
which collects elements into a
BikeMap
whose keys are the result of applying a key
mapping function to the input elements.toMap(Function, Function)
,
toMap(Function, Function, BinaryOperator)
,
toMap(Function, Function, BinaryOperator, Supplier)
public static <T,R,C,U,M extends BikeyMap<R,C,U>> java.util.stream.Collector<T,?,M> toMap(java.util.function.Function<? super T,? extends R> rowKeyMapper, java.util.function.Function<? super T,? extends C> columnKeyMapper, java.util.function.Function<? super T,? extends U> valueMapper, java.util.function.Supplier<M> mapSupplier)
Collector
that accumulates elements into a
BikeyMap
whose keys and values are the result of applying the
provided mapping functions to the input elements.
If the mapped bikey (row and column) contains duplicates (according to
Object.equals(Object)
), the value mapping function is applied to
each equal element, and the results are merged using the provided merging
function.
The returned Collector
is not concurrent and doesn't support
parallel stream pipelines.
T
- the type of the input elementsR
- row key type of the map keysC
- column key type of the map keysU
- the output type of the value mapping functionM
- the type of the resulting BikeMap
rowKeyMapper
- a mapping function to produce row keycolumnKeyMapper
- a mapping function to produce column keyvalueMapper
- a mapping function to produce valuesmapSupplier
- a function which returns a new, empty BikeyMap
into
which the results will be insertedCollector
which collects elements into a
BikeMap
whose keys are the result of applying a key
mapping function to the input elements.toMap(Function, Function, Function)
,
toMap(Function, Function, Function, BinaryOperator)
,
toMap(Function, Function, Function, BinaryOperator, Supplier)
public static <T,R,C,U> java.util.stream.Collector<T,?,BikeyMap<R,C,U>> toMap(java.util.function.Function<? super T,? extends Bikey<R,C>> keyMapper, java.util.function.Function<? super T,? extends U> valueMapper, java.util.function.BinaryOperator<U> mergeFunction)
Collector
that accumulates elements into a
BikeyMap
whose keys and values are the result of applying the
provided mapping functions to the input elements.
If the mapped bikey (row and column) contains duplicates (according to
Object.equals(Object)
), the value mapping function is applied to
each equal element, and the results are merged using the provided merging
function. The BikeyMap
is created by a provided supplier
function.
The returned Collector
is not concurrent and doesn't support
parallel stream pipelines.
T
- the type of the input elementsR
- row key type of the map keysC
- column key type of the map keysU
- the output type of the value mapping functionkeyMapper
- a mapping function to produce bikeysvalueMapper
- a mapping function to produce valuesmergeFunction
- a merge function, used to resolve collisions between values
associated with the same key, as supplied to
BikeyMap.merge(Object, Object, Object, BiFunction)
Collector
which collects elements into a
BikeMap
whose keys are the result of applying a key
mapping function to the input elements, and whose values are the
result of applying a value mapping function to all input elements
equal to the key and combining them using the merge functiontoMap(Function, Function)
,
toMap(Function, Function, Supplier)
,
toMap(Function, Function, BinaryOperator, Supplier)
public static <T,R,C,U> java.util.stream.Collector<T,?,BikeyMap<R,C,U>> toMap(java.util.function.Function<? super T,? extends R> rowKeyMapper, java.util.function.Function<? super T,? extends C> columnKeyMapper, java.util.function.Function<? super T,? extends U> valueMapper, java.util.function.BinaryOperator<U> mergeFunction)
Collector
that accumulates elements into a
BikeyMap
whose keys and values are the result of applying the
provided mapping functions to the input elements.
If the mapped bikey (row and column) contains duplicates (according to
Object.equals(Object)
), the value mapping function is applied to
each equal element, and the results are merged using the provided merging
function. The BikeyMap
is created by a provided supplier
function.
The returned Collector
is not concurrent and doesn't support
parallel stream pipelines.
T
- the type of the input elementsR
- row key type of the map keysC
- column key type of the map keysU
- the output type of the value mapping functionrowKeyMapper
- a mapping function to produce row keycolumnKeyMapper
- a mapping function to produce column keyvalueMapper
- a mapping function to produce valuesmergeFunction
- a merge function, used to resolve collisions between values
associated with the same key, as supplied to
BikeyMap.merge(Object, Object, Object, BiFunction)
Collector
which collects elements into a
BikeMap
whose keys are the result of applying a key
mapping function to the input elements, and whose values are the
result of applying a value mapping function to all input elements
equal to the key and combining them using the merge functiontoMap(Function, Function, Function)
,
toMap(Function, Function, Function, Supplier)
,
toMap(Function, Function, Function, BinaryOperator, Supplier)
public static <T,R,C,U,M extends BikeyMap<R,C,U>> java.util.stream.Collector<T,?,M> toMap(java.util.function.Function<? super T,? extends Bikey<R,C>> keyMapper, java.util.function.Function<? super T,? extends U> valueMapper, java.util.function.BinaryOperator<U> mergeFunction, java.util.function.Supplier<M> mapSupplier)
Collector
that accumulates elements into a
BikeyMap
whose keys and values are the result of applying the
provided mapping functions to the input elements.
If the mapped bikey (row and column) contains duplicates (according to
Object.equals(Object)
), the value mapping function is applied to
each equal element, and the results are merged using the provided merging
function. The BikeyMap
is created by a provided supplier
function.
The returned Collector
is not concurrent and doesn't support
parallel stream pipelines.
T
- the type of the input elementsR
- the output row type of the key mapping functionC
- the output column type of the key mapping functionU
- the output type of the value mapping functionM
- the type of the resulting BikeMap
keyMapper
- a mapping function to produce bikeysvalueMapper
- a mapping function to produce valuesmergeFunction
- a merge function, used to resolve collisions between values
associated with the same key, as supplied to
BikeyMap.merge(Object, Object, Object, BiFunction)
mapSupplier
- a function which returns a new, empty BikeyMap
into
which the results will be insertedCollector
which collects elements into a
BikeMap
whose keys are the result of applying a key
mapping function to the input elements, and whose values are the
result of applying a value mapping function to all input elements
equal to the key and combining them using the merge functiontoMap(Function, Function)
,
toMap(Function, Function, Supplier)
,
toMap(Function, Function, BinaryOperator)
public static <T,R,C,U,M extends BikeyMap<R,C,U>> java.util.stream.Collector<T,?,M> toMap(java.util.function.Function<? super T,? extends R> rowKeyMapper, java.util.function.Function<? super T,? extends C> columnKeyMapper, java.util.function.Function<? super T,? extends U> valueMapper, java.util.function.BinaryOperator<U> mergeFunction, java.util.function.Supplier<M> mapSupplier)
Collector
that accumulates elements into a
BikeyMap
whose keys and values are the result of applying the
provided mapping functions to the input elements.
If the mapped bikey (row and column) contains duplicates (according to
Object.equals(Object)
), the value mapping function is applied to
each equal element, and the results are merged using the provided merging
function. The BikeyMap
is created by a provided supplier
function.
The returned Collector
is not concurrent and doesn't support
parallel stream pipelines.
T
- the type of the input elementsR
- the output row type of the key mapping functionC
- the output column type of the key mapping functionU
- the output type of the value mapping functionM
- the type of the resulting BikeMap
rowKeyMapper
- a mapping function to produce row keycolumnKeyMapper
- a mapping function to produce column keyvalueMapper
- a mapping function to produce valuesmergeFunction
- a merge function, used to resolve collisions between values
associated with the same key, as supplied to
BikeyMap.merge(Object, Object, Object, BiFunction)
mapSupplier
- a function which returns a new, empty BikeyMap
into
which the results will be insertedCollector
which collects elements into a
BikeMap
whose keys are the result of applying a key
mapping function to the input elements, and whose values are the
result of applying a value mapping function to all input elements
equal to the key and combining them using the merge functiontoMap(Function, Function, Function)
,
toMap(Function, Function, Function, Supplier)
,
toMap(Function, Function, Function, BinaryOperator)