Record Class ConditionalTupleLifecycle<Tuple_ extends AbstractTuple>

java.lang.Object
java.lang.Record
ai.timefold.solver.core.impl.bavet.common.tuple.ConditionalTupleLifecycle<Tuple_>
All Implemented Interfaces:
TupleLifecycle<Tuple_>

public record ConditionalTupleLifecycle<Tuple_ extends AbstractTuple>(TupleLifecycle<Tuple_ extends AbstractTuple> downstreamLifecycle, ai.timefold.solver.core.impl.bavet.common.tuple.ConditionalTupleLifecycle.TuplePredicate<Tuple_ extends AbstractTuple> predicate) extends Record implements TupleLifecycle<Tuple_>
  • Constructor Details

    • ConditionalTupleLifecycle

      public ConditionalTupleLifecycle(TupleLifecycle<Tuple_> downstreamLifecycle, ai.timefold.solver.core.impl.bavet.common.tuple.ConditionalTupleLifecycle.TuplePredicate<Tuple_> predicate)
      Creates an instance of a ConditionalTupleLifecycle record class.
      Parameters:
      downstreamLifecycle - the value for the downstreamLifecycle record component
      predicate - the value for the predicate record component
  • Method Details

    • insert

      public void insert(Tuple_ tuple)
      Specified by:
      insert in interface TupleLifecycle<Tuple_ extends AbstractTuple>
    • update

      public void update(Tuple_ tuple)
      Specified by:
      update in interface TupleLifecycle<Tuple_ extends AbstractTuple>
    • retract

      public void retract(Tuple_ tuple)
      Specified by:
      retract in interface TupleLifecycle<Tuple_ extends AbstractTuple>
    • toString

      public String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • downstreamLifecycle

      public TupleLifecycle<Tuple_> downstreamLifecycle()
      Returns the value of the downstreamLifecycle record component.
      Returns:
      the value of the downstreamLifecycle record component
    • predicate

      public ai.timefold.solver.core.impl.bavet.common.tuple.ConditionalTupleLifecycle.TuplePredicate<Tuple_> predicate()
      Returns the value of the predicate record component.
      Returns:
      the value of the predicate record component