@PublicApi
public static interface StructureQueryConstraint.Acceptor
StructureQueryConstraint.Sequence
values - i.e., the consumer of matching indices.Modifier and Type | Method and Description |
---|---|
void |
accept(int index)
Report one matching index.
|
void |
accept(IntIterable indices)
Report several matching indices.
|
void |
willAccept(int n)
Optimization: if a
Sequence knows that it is going to accept n indices, it might communicate this knowledge
to this Acceptor through this method, so that the latter can preallocate internal buffers. |
void accept(int index)
index
- matching indexvoid accept(IntIterable indices)
indices
- matching indices (increasing)void willAccept(int n)
Sequence
knows that it is going to accept n
indices, it might communicate this knowledge
to this Acceptor
through this method, so that the latter can preallocate internal buffers.
Important: if this method is called, it must be followed by calls to accept(int)
or accept(IntIterable)
that provide at least n
indices. Do not call this method if you are unsure
that you will provide that many values.Copyright © 2024 Tempo Software. All Rights Reserved.