public final class CollectorUtils extends Object
| Modifier | Constructor and Description |
|---|---|
private |
CollectorUtils() |
| Modifier and Type | Method and Description |
|---|---|
static <T,K,U> Collector<T,?,Map<K,U>> |
toLinkedMap(Function<? super T,? extends K> keyMapper,
Function<? super T,? extends U> valueMapper)
Map collector relying on a
LinkedHashMap |
private CollectorUtils()
public static <T,K,U> Collector<T,?,Map<K,U>> toLinkedMap(Function<? super T,? extends K> keyMapper, Function<? super T,? extends U> valueMapper)
LinkedHashMapT - the type of the input elementsK - the output type of the key mapping functionU - the output type of the value mapping functionkeyMapper - a mapping function to produce keysvalueMapper - a mapping function to produce values