Documentation
      ¶
    
    
  
    
  
    Index ¶
- type FindOp
 - type FindSink
 - type FindTask
 - func (task *FindTask) DoLeaf(ctx context.Context) terminal.Sink
 - func (task *FindTask) MakeChild(spliterator spliterator.Spliterator) terminal.Task
 - func (task *FindTask) OnCompletion(caller terminal.Task)
 - func (task *FindTask) WithParent(parent *FindTask, spliterator spliterator.Spliterator) *FindTask
 - func (task *FindTask) WithSpliterator(op FindOp, spliterator spliterator.Spliterator) *FindTask
 
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FindOp ¶
type FindOp struct {
	terminal.TODOOperation
	// contains filtered or unexported fields
}
    *
- A short-circuiting {@code TerminalOp} that searches for an element in a
 - stream pipeline, and terminates when it finds one. Implements both
 - find-first (find the first element in the encounter order) and find-any
 - (find any element, may not be the first in encounter order.) *
 - @param <T> the output type of the stream pipeline
 - @param <O> the result type of the find operation, typically an optional
 - type
 
func NewFindOp ¶
func NewFindOp(mustFindFirst bool, presentPredicate predicate.Predicater, sinkSupplier func() *FindSink) *FindOp
*
- Constructs a {@code Operation}. *
 - @param mustFindFirst if true, must find the first element in
 - encounter order, otherwise can find any element
 - @param shape stream shape of elements to search
 - @param emptyValue result value corresponding to "found nothing"
 - @param presentPredicate {@code Predicate} on result value
 - corresponding to "found something"
 - @param sinkSupplier supplier for a {@code TerminalSink} implementing
 - the matching functionality
 
func NewFindOp2 ¶
func NewFindOp2(mustFindFirst bool, presentPredicate predicate.Predicater) *FindOp
func (FindOp) EvaluateParallel ¶
func (op FindOp) EvaluateParallel(ctx context.Context, spliterator spliterator.Spliterator) optional.Optional
func (FindOp) EvaluateSequential ¶
func (op FindOp) EvaluateSequential(ctx context.Context, spliterator spliterator.Spliterator) optional.Optional
type FindSink ¶
func NewFindSink ¶
func NewFindSink() *FindSink
func (*FindSink) CancellationRequested ¶
return true if found
type FindTask ¶
type FindTask struct {
	terminal.TODOShortCircuitTask
	// contains filtered or unexported fields
}
    func (*FindTask) MakeChild ¶
func (task *FindTask) MakeChild(spliterator spliterator.Spliterator) terminal.Task
func (*FindTask) OnCompletion ¶
func (*FindTask) WithParent ¶
func (task *FindTask) WithParent(parent *FindTask, spliterator spliterator.Spliterator) *FindTask
*
- Constructor for non-root nodes. *
 - @param parent parent task in the computation tree
 - @param spliterator the {@code Spliterator} for the portion of the
 - computation tree described by this task
 
func (*FindTask) WithSpliterator ¶
func (task *FindTask) WithSpliterator(op FindOp, spliterator spliterator.Spliterator) *FindTask
*
- Constructor for root tasks. *
 - @param helper the {@code PipelineHelper} describing the stream pipeline
 - up to this operation
 - @param spliterator the {@code Spliterator} describing the source for this
 - pipeline
 
 Click to show internal directories. 
   Click to hide internal directories.