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 factX, maps a property or a combination of properties ofX, denoted byindexProperties, to all instances ofXthat 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)}, callingvisit(room=A)would visit lesson 1 and 3.The fact X is wrapped in a Tuple, because the
TupleStateis needed by clients offorEach(IndexProperties, Consumer).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidforEach(IndexProperties indexProperties, Consumer<T> tupleConsumer)booleanisEmpty()ElementAwareListEntry<T>put(IndexProperties indexProperties, T tuple)voidremove(IndexProperties indexProperties, ElementAwareListEntry<T> entry)intsize(IndexProperties indexProperties)
-
-
-
Method Detail
-
put
ElementAwareListEntry<T> put(IndexProperties indexProperties, T tuple)
-
remove
void remove(IndexProperties indexProperties, ElementAwareListEntry<T> entry)
-
size
int size(IndexProperties indexProperties)
-
forEach
void forEach(IndexProperties indexProperties, Consumer<T> tupleConsumer)
-
isEmpty
boolean isEmpty()
-
-