クラス MultiValueMapCollector<T,K,V>
java.lang.ObjectSE
org.springframework.util.MultiValueMapCollector<T,K,V>
- 型パラメーター:
T- 削減操作への入力要素の型K- キー型V- 値要素型
- 実装されているすべてのインターフェース:
CollectorSE<T, MultiValueMap<K,V>, MultiValueMap<K, V>>
public final class MultiValueMapCollector<T,K,V>
extends ObjectSE
implements CollectorSE<T, MultiValueMap<K,V>, MultiValueMap<K,V>>
- 導入:
- 7.0.2
- 作成者:
- Jens Schauder, Florian Hof, Sam Brannen
ネストされたクラスの要約
インターフェース CollectorSE から継承されたネストクラス / インターフェース
Collector.CharacteristicsSE方法の概要
修飾子と型メソッド説明BiConsumerSE<MultiValueMap<K, V>, T> combiner()FunctionSE<MultiValueMap<K, V>, MultiValueMap<K, V>> finisher()static <K,V> MultiValueMapCollector <V, K, V> indexingBy(FunctionSE<V, K> indexer) 指定されたindexerを使用して新しいMultiValueMapCollectorを作成します。static <T,K, V> MultiValueMapCollector <T, K, V> of(FunctionSE<T, K> keyFunction, FunctionSE<T, V> valueFunction) 指定されたキーと値の関数から新しいMultiValueMapCollectorを作成します。supplier()
メソッドの詳細
of
public static <T,K, MultiValueMapCollector<T,V> K, ofV> (FunctionSE<T, K> keyFunction, FunctionSE<T, V> valueFunction) 指定されたキーと値の関数から新しいMultiValueMapCollectorを作成します。- 型パラメーター:
T- 削減操作への入力要素の型K- キー型V- 値要素型- パラメーター:
keyFunction-T型の要素をK型のキーに変換するFunctionvalueFunction-T型の要素をV型の要素に変換するFunction。変換を行わない場合はFunction.identity()を指定します- 戻り値:
- 新しい
MultiValueMapCollector - 関連事項:
indexingBy
指定されたindexerを使用して新しいMultiValueMapCollectorを作成します。指定された
indexerをキー関数として、Function.identity()を値関数として提供して、of(Function, Function)に委譲します。たとえば、文字列の
Streamの要素を、文字列の長さをキーとするMultiValueMapに収集する場合は、MultiValueMapCollector.indexingBy(String::length)を介してそのようなCollectorSE を作成できます。- 型パラメーター:
K- キー型V- 値要素型- パラメーター:
indexer-V型の値をK型のキーに変換するFunction- 戻り値:
indexerをベースにした新しいMultiValueMapCollector- 関連事項:
supplier
- 次で指定:
- インターフェース
CollectorSE<T,のK, V> supplier
accumulator
- 次で指定:
- インターフェース
CollectorSE<T,のK, V> accumulator
combiner
- 次で指定:
- インターフェース
CollectorSE<T,のK, V> combiner
finisher
- 次で指定:
- インターフェース
CollectorSE<T,のK, V> finisher
characteristics
- 次で指定:
- インターフェース
CollectorSE<T,のK, V> characteristics