public interface StreamUtils
Stream
SE ユーティリティのメソッドとクラス。修飾子と型 | メソッドと説明 |
---|---|
static <T> StreamSE<T> | createStreamFromIterator(CloseableIterator<T> iterator) |
static <T> StreamSE<T> | createStreamFromIterator(IteratorSE<T> iterator) 指定された Iterator SE に連動する Stream SE を返します |
static <T> StreamSE<T> | fromNullable(T source) |
static <T,K,V> CollectorSE<T,MultiValueMap<K,V>,MultiValueMap<K,V>> | toMultiMap(FunctionSE<T,K> keyFunction, FunctionSE<T,V> valueFunction) MultiValueMap を作成する Collector SE を返します。 |
static <T> CollectorSE<T,?,ListSE<T>> | toUnmodifiableList() Collector SE を返し、変更不可能な List SE を作成します。 |
static <T> CollectorSE<T,?,SetSE<T>> | toUnmodifiableSet() Collector SE を返し、変更不可能な Set SE を作成します。 |
static <L,R,T> StreamSE<T> | zip(StreamSE<L> left, StreamSE<R> right, BiFunctionSE<L,R,T> combiner) 指定された BiFunction SE を使用して、指定された Stream SE を圧縮します。 |
static <T> StreamSE<T> createStreamFromIterator(IteratorSE<T> iterator)
Iterator
SE に連動する Stream
SE を返します iterator
- null であってはなりません。static <T> StreamSE<T> createStreamFromIterator(CloseableIterator<T> iterator)
iterator
- null であってはなりません。static <T> CollectorSE<T,?,ListSE<T>> toUnmodifiableList()
Collector
SE を返し、変更不可能な List
SE を作成します。static <T> CollectorSE<T,?,SetSE<T>> toUnmodifiableSet()
Collector
SE を返し、変更不可能な Set
SE を作成します。static <T,K,V> CollectorSE<T,MultiValueMap<K,V>,MultiValueMap<K,V>> toMultiMap(FunctionSE<T,K> keyFunction, FunctionSE<T,V> valueFunction)
MultiValueMap
を作成する Collector
SE を返します。keyFunction
- Stream
SE の要素からキーを作成する Function
SEvalueFunction
- Stream
SE の要素から値を作成する Function
SEstatic <L,R,T> StreamSE<T> zip(StreamSE<L> left, StreamSE<R> right, BiFunctionSE<L,R,T> combiner)
BiFunction
SE を使用して、指定された Stream
SE を圧縮します。結果の Stream
SE は、2 つの短い方の長さを持ち、2 つの短い方の Stream
SE が使い果たされたときの圧縮を省略します。left
- null であってはなりません。right
- null であってはなりません。combiner
- null であってはなりません。Copyright © 2011–2019 Pivotal Software, Inc.. All rights reserved.