@FunctionalInterface public interface ToDoubleDocumentExtractor
| Modifier and Type | Method and Description |
|---|---|
double |
extractAsDouble(@NotNull Wire wire,
long index)
Extracts a value of type
double from the provided wire and index or else Double.NaN
if no value can be extracted. |
default ToDoubleDocumentExtractor |
filter(@NotNull DoublePredicate predicate)
Creates and returns a new ToDoubleDocumentExtractor consisting of the elements of this ToDoubleDocumentExtractor
that match the provided
predicate. |
default ToDoubleDocumentExtractor |
map(@NotNull DoubleUnaryOperator mapper)
Creates and returns a new ToDoubleDocumentExtractor consisting of the results (of type R) of applying the provided
mapper to the elements of this ToDoubleDocumentExtractor. |
default ToLongDocumentExtractor |
mapToLong(@NotNull DoubleToLongFunction mapper)
Creates and returns a new ToLongDocumentExtractor consisting of applying the provided
mapper to the elements of this ToDoubleDocumentExtractor. |
default <T> DocumentExtractor<T> |
mapToObj(@NotNull DoubleFunction<? extends T> mapper)
Creates and returns a new DocumentExtractor consisting of applying the provided
mapper to the elements of this DocumentExtractor. |
double extractAsDouble(@NotNull
@NotNull Wire wire,
long index)
double from the provided wire and index or else Double.NaN
if no value can be extracted.
Double.NaN may be returned if the queue was written with a method writer and there are messages in the
queue but of another type.
Extractors that must include Double.NaN as a valid value must use other means of
aggregating values (e.g. use an DocumentExtractor.
wire - to useindex - to useDouble.NaNdefault ToDoubleDocumentExtractor map(@NotNull @NotNull DoubleUnaryOperator mapper)
mapper to the elements of this ToDoubleDocumentExtractor.
Values mapped to Double.NaN are removed.
mapper - to applyNullPointerException - if the provided mapper is nulldefault <T> DocumentExtractor<T> mapToObj(@NotNull @NotNull DoubleFunction<? extends T> mapper)
mapper to the elements of this DocumentExtractor.
Values mapped to Double.NaN are removed.
mapper - to applyNullPointerException - if the provided mapper is nulldefault ToLongDocumentExtractor mapToLong(@NotNull @NotNull DoubleToLongFunction mapper)
mapper to the elements of this ToDoubleDocumentExtractor.
Values mapped to Double.NaN are removed.
mapper - to applyNullPointerException - if the provided mapper is nulldefault ToDoubleDocumentExtractor filter(@NotNull @NotNull DoublePredicate predicate)
predicate.predicate - to apply to each element to determine if it
should be includedNullPointerException - if the provided predicate is nullCopyright © 2023. All rights reserved.