public class AbortTupleSequence extends WrapperTuple implements TupleSequence
Constructor and Description |
---|
AbortTupleSequence(TupleSequence base,
java.util.function.BooleanSupplier abortCondition)
Constructor with checking period of 1 (every element).
|
AbortTupleSequence(TupleSequence base,
java.util.function.BooleanSupplier abortCondition,
int checkPeriod)
Constructor with specified checking period.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isAborted()
Indicates whether the abort condition has been detected.
|
boolean |
next()
Advances to the next entry.
|
AbortTupleSequence |
split()
Attempts to partition this object into two halves,
ideally of similar size.
|
long |
splittableSize()
Provides an estimate of the number of processable items in this object.
|
getBooleanValue, getDoubleValue, getIntValue, getLongValue, getObjectValue, getRowIndex
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getBooleanValue, getDoubleValue, getIntValue, getLongValue, getObjectValue, getRowIndex
public AbortTupleSequence(TupleSequence base, java.util.function.BooleanSupplier abortCondition)
base
- base sequenceabortCondition
- condition on which the stream should stoppublic AbortTupleSequence(TupleSequence base, java.util.function.BooleanSupplier abortCondition, int checkPeriod)
base
- base sequenceabortCondition
- condition on which the stream should stopcheckPeriod
- approximate frequency of checking the conditionpublic boolean next()
TupleSequence
next
in interface TupleSequence
next
in interface Sequence
public AbortTupleSequence split()
Splittable
Following a successful call, the two parts may be processed in different threads.
split
in interface Splittable<TupleSequence>
Spliterator.trySplit()
public long splittableSize()
Splittable
If no estimate for the size is available, a negative value should be returned.
splittableSize
in interface Splittable<TupleSequence>
public boolean isAborted()
Copyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.