TerminalOp that implement
quantified predicate matching on the elements of a stream. Supported variants
include match-all, match-any, and match-none.
| Modifier and Type | Class and Description |
|---|---|
| private abstract static class | MatchOps.
The output type of the stream pipeline T>Boolean specific terminal sink to avoid the boxing costs when returning results. |
| pack-priv static enum | MatchOps.
Enum describing quantified match options -- all match, any match, none match. |
| private static class | MatchOps.
the output type of the stream pipeline T>A short-circuiting |
| private static class | MatchOps.
the type of source elements for the pipeline P_IN, the type of output elements for the pipeline P_OUT>ForkJoinTask implementation to implement a parallel short-circuiting quantified match |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static TerminalOp | Returns: aTerminalOp implementing the desired quantified match
criteriathe predicate, MatchOps.Predicate to apply to stream elementsthe kind of quantified match (all, any, none) matchKindConstructs a quantified predicate matcher for a |
| public static TerminalOp | Returns: aTerminalOp implementing the desired quantified match
criteriathe predicate, MatchOps.Predicate to apply to stream elementsthe kind of quantified match (all, any, none) matchKindConstructs a quantified predicate matcher for an |
| public static TerminalOp | Returns: aTerminalOp implementing the desired quantified match
criteriathe predicate, MatchOps.Predicate to apply to stream elementsthe kind of quantified match (all, any, none) matchKindConstructs a quantified predicate matcher for a |
| public static < the type of stream elements T> TerminalOp |
| MatchOps | back to summary |
|---|---|
| private MatchOps() | |
| makeDouble | back to summary |
|---|---|
| public static TerminalOp Constructs a quantified predicate matcher for a
| |
| makeInt | back to summary |
|---|---|
| public static TerminalOp Constructs a quantified predicate matcher for an
| |
| makeLong | back to summary |
|---|---|
| public static TerminalOp Constructs a quantified predicate matcher for a
| |
| makeRef | back to summary |
|---|---|
| public static <T> TerminalOp Constructs a quantified predicate matcher for a Stream.
| |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | cancellationRequested()
Overrides default java. Indicates that this |
| public boolean |
| stop | back to summary |
|---|---|
| pack-priv boolean stop | |
| value | back to summary |
|---|---|
| pack-priv boolean value | |
| BooleanTerminalSink | back to summary |
|---|---|
| pack-priv BooleanTerminalSink(MatchOps. | |
| cancellationRequested | back to summary |
|---|---|
| public boolean cancellationRequested() Overrides default java. Doc from java. Indicates that this
| |
| getAndClearState | back to summary |
|---|---|
| public boolean getAndClearState() | |
| Modifier and Type | Field and Description |
|---|---|
| public static final MatchOps. | ALL
Do all elements match the predicate? |
| public static final MatchOps. | ANY
Do any elements match the predicate? |
| public static final MatchOps. | NONE
Do no elements match the predicate? |
| private final boolean | |
| private final boolean |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static MatchOps. | |
| public static MatchOps. |
| ALL | back to summary |
|---|---|
| public static final MatchOps. Do all elements match the predicate? | |
| ANY | back to summary |
|---|---|
| public static final MatchOps. Do any elements match the predicate? | |
| NONE | back to summary |
|---|---|
| public static final MatchOps. Do no elements match the predicate? | |
| shortCircuitResult | back to summary |
|---|---|
| private final boolean shortCircuitResult | |
| stopOnPredicateMatches | back to summary |
|---|---|
| private final boolean stopOnPredicateMatches | |
| MatchKind | back to summary |
|---|---|
| private MatchKind(boolean stopOnPredicateMatches, boolean shortCircuitResult) | |
| valueOf | back to summary |
|---|---|
| public static MatchOps. | |
| values | back to summary |
|---|---|
| public static MatchOps. | |
TerminalOp that evaluates a predicate on the
elements of a stream and determines whether all, any or none of those
elements match the predicate.
| Modifier and Type | Field and Description |
|---|---|
| private final StreamShape | |
| pack-priv final MatchOps. | |
| pack-priv final Supplier |
| Access | Constructor and Description |
|---|---|
| pack-priv | MatchOp(StreamShape
the output shape of the stream pipeline shape, MatchOps.the kind of quantified match (all, any, none) matchKind,Supplier for a Sink of the
appropriate shape which implements the matching operationConstructs a |
| Modifier and Type | Method and Description |
|---|---|
| public <S> Boolean | evaluateParallel(PipelineHelper<T> helper, Spliterator<S> spliterator)
Overrides default java. Performs a parallel evaluation of the operation using the specified
|
| public <S> Boolean | evaluateSequential(PipelineHelper<T> helper, Spliterator<S> spliterator)
Implements java. Performs a sequential evaluation of the operation using the specified
|
| public int | getOpFlags()
Overrides default java. Gets the stream flags of the operation. |
| public StreamShape | inputShape()
Overrides default java. Gets the shape of the input type of this operation. |
| inputShape | back to summary |
|---|---|
| private final StreamShape inputShape | |
| matchKind | back to summary |
|---|---|
| pack-priv final MatchOps. | |
| sinkSupplier | back to summary |
|---|---|
| pack-priv final Supplier<MatchOps. | |
| MatchOp | back to summary |
|---|---|
| pack-priv MatchOp(StreamShape shape, MatchOps. Constructs a
| |
| evaluateParallel | back to summary |
|---|---|
| public <S> Boolean evaluateParallel(PipelineHelper<T> helper, Spliterator<S> spliterator) Overrides default java. Doc from java. Performs a parallel evaluation of the operation using the specified
| |
| evaluateSequential | back to summary |
|---|---|
| public <S> Boolean evaluateSequential(PipelineHelper<T> helper, Spliterator<S> spliterator) Implements java. Doc from java. Performs a sequential evaluation of the operation using the specified
| |
| getOpFlags | back to summary |
|---|---|
| public int getOpFlags() Overrides default java. Doc from java. Gets the stream flags of the operation. Terminal operations may set a
limited subset of the stream flags defined in
| |
| inputShape | back to summary |
|---|---|
| public StreamShape inputShape() Overrides default java. Doc from java. Gets the shape of the input type of this operation.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final MatchOps. |
| Access | Constructor and Description |
|---|---|
| pack-priv | MatchTask(MatchOps.
Constructor for root node |
| pack-priv | MatchTask(MatchOps.
Constructor for non-root node |
| Modifier and Type | Method and Description |
|---|---|
| protected Boolean | doLeaf()
Implements abstract java. Computes the result associated with a leaf node. |
| protected Boolean | getEmptyResult()
Implements abstract java. Returns the value indicating the computation completed with no task finding a short-circuitable result. |
| protected MatchOps. | makeChild(Spliterator<P_IN> spliterator)
Implements abstract java. Constructs a new node of type T whose parent is the receiver; must call the AbstractTask(T, Spliterator) constructor with the receiver and the provided Spliterator. |
| op | back to summary |
|---|---|
| private final MatchOps. | |
| MatchTask | back to summary |
|---|---|
| pack-priv MatchTask(MatchOps. Constructor for root node | |
| MatchTask | back to summary |
|---|---|
| pack-priv MatchTask(MatchOps. Constructor for non-root node | |
| doLeaf | back to summary |
|---|---|
| protected Boolean doLeaf() Implements abstract java. Doc from java. Computes the result associated with a leaf node. Will be called by
| |
| getEmptyResult | back to summary |
|---|---|
| protected Boolean getEmptyResult() Implements abstract java. Doc from java. Returns the value indicating the computation completed with no task
finding a short-circuitable result. For example, for a "find" operation,
this might be null or an empty
| |
| makeChild | back to summary |
|---|---|
| protected MatchOps. Implements abstract java. Doc from java. Constructs a new node of type T whose parent is the receiver; must call the AbstractTask(T, Spliterator) constructor with the receiver and the provided Spliterator.
| |