インタフェースjava.util.stream.Gathererの
使用

Gathererを使用するパッケージ
パッケージ
説明
コレクションに対するマップ-リデュース変換など、要素のストリームに対する関数型の操作をサポートするクラスです。
  • java.util.streamでのGathererの使用

    Gathererを返すjava.util.streamのメソッド
    修飾子と型
    メソッド
    説明
    default <RR> Gatherer<T,?,RR>
    Gatherer.andThen(Gatherer<? super R, ?, ? extends RR> that)
    このGathererの出力をそのGathererの入力に接続する合成Gathererを返します。
    static <T,R> Gatherer<T,?,R>
    Gatherers.fold(Supplier<R> initial, BiFunction<? super R, ? super T, ? extends R> folder)
    コンビナ関数を実装できないシナリオ、または本質的に順序に依存する削減に対して、順序付けされたreduction-like変換を実行するGathererを返します。
    static <T,R> Gatherer<T,?,R>
    Gatherers.mapConcurrent(int maxConcurrency, Function<? super T, ? extends R> mapper)
    「仮想スレッド」を使用して、構成されたレベルの最大同時実行性でファンクションを同時に実行する操作。
    static <T,A,R> Gatherer<T,A,R>
    Gatherer.of(Supplier<A> initializer, Gatherer.Integrator<A,T,R> integrator, BinaryOperator<A> combiner, BiConsumer<A, Gatherer.Downstream<? super R>> finisher)
    指定されたinitializer, integrator, combinerおよびfinisherによって記述された、パラレル化可能な新しいGathererを返します。
    static <T,R> Gatherer<T,Void,R>
    Gatherer.of(Gatherer.Integrator<Void,T,R> integrator)
    指定されたintegratorによって記述された、新しいパラレル化可能なステートレスなGathererを返します。
    static <T,R> Gatherer<T,Void,R>
    Gatherer.of(Gatherer.Integrator<Void,T,R> integrator, BiConsumer<Void, Gatherer.Downstream<? super R>> finisher)
    指定されたintegratorおよびfinisherによって記述された、新しいパラレル化可能なステートレスなGathererを返します。
    static <T,A,R> Gatherer<T,A,R>
    Gatherer.ofSequential(Supplier<A> initializer, Gatherer.Integrator<A,T,R> integrator)
    指定されたinitializerおよびintegratorによって記述された、新しい順次Gathererを返します。
    static <T,A,R> Gatherer<T,A,R>
    Gatherer.ofSequential(Supplier<A> initializer, Gatherer.Integrator<A,T,R> integrator, BiConsumer<A, Gatherer.Downstream<? super R>> finisher)
    指定されたinitializerintegratorおよびfinisherによって記述された、新しい順次Gathererを返します。
    static <T,R> Gatherer<T,Void,R>
    Gatherer.ofSequential(Gatherer.Integrator<Void,T,R> integrator)
    指定されたintegratorによって記述された、新しい順次およびステートレスなGathererを返します。
    static <T,R> Gatherer<T,Void,R>
    Gatherer.ofSequential(Gatherer.Integrator<Void,T,R> integrator, BiConsumer<Void, Gatherer.Downstream<? super R>> finisher)
    指定されたintegratorおよびfinisherによって記述された、新しい順次およびステートレスなGathererを返します。
    static <T,R> Gatherer<T,?,R>
    Gatherers.scan(Supplier<R> initial, BiFunction<? super R, ? super T, ? extends R> scanner)
    プリフィクス・スキャンを実行するGathererを返します -- 増分蓄積 -- 提供された機能を使用する。
    static <TR> Gatherer<TR,?,List<TR>>
    Gatherers.windowFixed(int windowSize)
    ウィンドウに要素を収集するGathererを返します -- 要素の検出順序のグループ -- 固定サイズです。
    static <TR> Gatherer<TR,?,List<TR>>
    Gatherers.windowSliding(int windowSize)
    ウィンドウに要素を収集するGathererを返します -- 要素の検出順序のグループ -- 特定のサイズ。後続の各ウィンドウには、最新のウィンドウを除く前のウィンドウのすべての要素が含まれ、ストリームに次の要素が追加されます。
    Gathererのパラメータを持つjava.util.streamのメソッド
    修飾子と型
    メソッド
    説明
    default <RR> Gatherer<T,?,RR>
    Gatherer.andThen(Gatherer<? super R, ?, ? extends RR> that)
    このGathererの出力をそのGathererの入力に接続する合成Gathererを返します。
    default <R> Stream<R>
    Stream.gather(Gatherer<? super T, ?, R> gatherer)
    指定されたGathererをこのストリームの要素に適用した結果で構成されるストリームを返します。