public final class Reductions extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Reductions.Counting
A Reduction class that counts the number of excerpts that have been processed.
|
| Modifier and Type | Method and Description |
|---|---|
static Reduction<LongSupplier> |
counting()
Creates and returns a new Reduction that will count the number of excerpts.
|
static Reduction<DoubleSupplier> |
reducingDouble(@NotNull ToDoubleDocumentExtractor extractor,
double identity,
@NotNull DoubleBinaryOperator accumulator)
Creates and returns a new Reduction that will extract elements of type
double using
the provided extractor and will accumulate values using the provided accumulator. |
static Reduction<LongSupplier> |
reducingLong(@NotNull ToLongDocumentExtractor extractor,
long identity,
@NotNull LongBinaryOperator accumulator)
Creates and returns a new Reduction that will extract elements of type
long using
the provided extractor and will accumulate values using the provided accumulator. |
public static Reduction<LongSupplier> reducingLong(@NotNull @NotNull ToLongDocumentExtractor extractor, long identity, @NotNull @NotNull LongBinaryOperator accumulator)
long using
the provided extractor and will accumulate values using the provided accumulator.
The initial state of the reduction will be the provided identity.
The returned Reduction is guaranteed to not create any internal objects.
extractor - to apply on each document (non-null)identity - initial start valueaccumulator - to apply for each element (non-null)NullPointerException - if any objects provided are null.public static Reduction<DoubleSupplier> reducingDouble(@NotNull @NotNull ToDoubleDocumentExtractor extractor, double identity, @NotNull @NotNull DoubleBinaryOperator accumulator)
double using
the provided extractor and will accumulate values using the provided accumulator.
The initial state of the reduction will be the provided identity.
The returned Reduction is guaranteed to not create any internal objects.
extractor - to apply on each document (non-null)identity - initial start valueaccumulator - to apply for each element (non-null)NullPointerException - if any objects provided are null.public static Reduction<LongSupplier> counting()
The returned Reduction is guaranteed to not create any internal objects.
Copyright © 2023. All rights reserved.