@FunctionalInterface public interface ToLongDocumentExtractor
| Modifier and Type | Method and Description |
|---|---|
long |
extractAsLong(@NotNull Wire wire,
long index)
Extracts a value of type
long from the provided wire and index or else Long.MIN_VALUE
if no value can be extracted. |
static ToLongDocumentExtractor |
extractingIndex() |
default ToLongDocumentExtractor |
filter(@NotNull LongPredicate predicate)
Creates and returns a new ToLongDocumentExtractor consisting of the elements of this ToLongDocumentExtractor
that match the provided
predicate. |
default ToLongDocumentExtractor |
map(@NotNull LongUnaryOperator mapper)
Creates and returns a new ToLongDocumentExtractor consisting of the results (of type R) of applying the provided
mapper to the elements of this ToLongDocumentExtractor. |
default ToDoubleDocumentExtractor |
mapToDouble(@NotNull LongToDoubleFunction mapper)
Creates and returns a new ToDoubleDocumentExtractor consisting of applying the provided
mapper to the elements of this ToLongDocumentExtractor. |
default <T> DocumentExtractor<T> |
mapToObj(@NotNull LongFunction<? extends T> mapper)
Creates and returns a new DocumentExtractor consisting of applying the provided
mapper to the elements of this ToLongDocumentExtractor. |
long extractAsLong(@NotNull
@NotNull Wire wire,
long index)
long from the provided wire and index or else Long.MIN_VALUE
if no value can be extracted.
Long.MIN_VALUE 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 Long.MIN_VALUE as a valid value must use other means of
aggregating values (e.g. use an DocumentExtractor.
wire - to useindex - to useLong.MIN_VALUEdefault ToLongDocumentExtractor map(@NotNull @NotNull LongUnaryOperator mapper)
mapper to the elements of this ToLongDocumentExtractor.
Values mapped to Long.MIN_VALUE are removed.
mapper - to applyNullPointerException - if the provided mapper is nulldefault <T> DocumentExtractor<T> mapToObj(@NotNull @NotNull LongFunction<? extends T> mapper)
mapper to the elements of this ToLongDocumentExtractor.
Values mapped to Long.MIN_VALUE are removed.
mapper - to applyNullPointerException - if the provided mapper is nulldefault ToDoubleDocumentExtractor mapToDouble(@NotNull @NotNull LongToDoubleFunction mapper)
mapper to the elements of this ToLongDocumentExtractor.
Values mapped to Long.MIN_VALUE are removed.
mapper - to applyNullPointerException - if the provided mapper is nulldefault ToLongDocumentExtractor filter(@NotNull @NotNull LongPredicate predicate)
predicate.predicate - to apply to each element to determine if it
should be includedNullPointerException - if the provided predicate is nullstatic ToLongDocumentExtractor extractingIndex()
Copyright © 2023. All rights reserved.