Interface Indexer<T>
- Type Parameters:
T- The element type. Often a tuple. For example forfrom(A).join(B), the tuple isUniTuple<A>xorUniTuple<B>. For example forBi<A, B>.join(C), the tuple isBiTuple<A, B>xorUniTuple<C>.
public interface Indexer<T>
An indexer for entity or fact
X,
maps a property or a combination of properties of X, denoted by indexProperties,
to all instances of X that match those properties,
depending on the the indexer type (equal, lower than, ...).
For example for {Lesson(id=1, room=A), Lesson(id=2, room=B), Lesson(id=3, room=A)},
calling visit(room=A) would visit lesson 1 and 3.
The fact X is wrapped in a Tuple, because the BavetTupleState is needed by clients of
forEach(IndexProperties, Consumer).
-
Method Summary
Modifier and TypeMethodDescriptionvoidforEach(IndexProperties indexProperties, Consumer<T> tupleConsumer) booleanisEmpty()put(IndexProperties indexProperties, T tuple) voidremove(IndexProperties indexProperties, TupleListEntry<T> entry) intsize(IndexProperties indexProperties)
-
Method Details
-
put
-
remove
-
size
-
forEach
-
isEmpty
boolean isEmpty()
-