public abstract static class StructureQueryConstraint.BulkFilter extends Object implements StructureQueryConstraint.Sequence
A base implementation for a constraint that looks at a bunch of rows at a time.
This class represents a "middle ground" between looking at one row at a time and at looking at all rows being filtered at once. This works best when the caller is not interested in all the results: it can stop at any moment, and the constraint will not process the rest of the rows.
| Modifier and Type | Field and Description |
|---|---|
protected int |
myBulkSize |
EMPTY| Modifier | Constructor and Description |
|---|---|
protected |
BulkFilter(IntIterator input,
int bulkSize) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
advance(StructureQueryConstraint.Acceptor acceptor)
Attempts to advance in this sequence by 0, 1 or more positions
(i.e., attempts to find the next 0, 1 or more matching indices).
|
protected abstract void |
bulkFilter(IntList input,
StructureQueryConstraint.Acceptor acceptor)
Processes a bunch of indices and passes the matching ones to the acceptor.
|
protected BulkFilter(IntIterator input,
int bulkSize)
input - the incoming indices to be filtered (from StructureQueryConstraint.filter(IntIterator, List, QueryContext)bulkSize - the size of the bulk that is processedpublic boolean advance(StructureQueryConstraint.Acceptor acceptor)
StructureQueryConstraint.Sequenceacceptor through calls to acceptor.accept(index)
or acceptor.accept(indices).
Return value indicates whether this sequence is capable of producing values: false indicates the end of this sequence.advance in interface StructureQueryConstraint.Sequenceacceptor - accepts members of this sequenceprotected abstract void bulkFilter(IntList input,
StructureQueryConstraint.Acceptor acceptor)
input - sorted indices to filteracceptor - accepts the resultsCopyright © 2023 ALM Works. All Rights Reserved.