java.lang.Object
ai.timefold.solver.constraint.streams.bavet.common.tuple.AbstractTuple
Direct Known Subclasses:
BiTuple, QuadTuple, TriTuple, UniTuple

public abstract sealed class AbstractTuple extends Object permits UniTuple<A>, BiTuple<A,B>, TriTuple<A,B,C>, QuadTuple<A,B,C,D>
A tuple is an out tuple in exactly one node and an in tuple in one or more nodes.

A tuple must not implement equals()/hashCode() to fact equality, because some stream operations (UniConstraintStream.map(Function), ...) might create 2 different tuple instances to contain the same facts and because a tuple's origin may replace a tuple's fact.

A tuple is modifiable. However, only the origin node of a tuple (the node where the tuple is the out tuple) may modify it.

  • Field Details

  • Constructor Details

    • AbstractTuple

      protected AbstractTuple(int storeSize)
  • Method Details

    • getStore

      public final <Value_> Value_ getStore(int index)
    • setStore

      public final void setStore(int index, Object value)
    • removeStore

      public <Value_> Value_ removeStore(int index)