Record Class BavetStaticDataFactory<Solution_>
java.lang.Object
java.lang.Record
ai.timefold.solver.core.impl.score.stream.bavet.BavetStaticDataFactory<Solution_>
- All Implemented Interfaces:
PrecomputeFactory
public record BavetStaticDataFactory<Solution_>(BavetConstraintFactory<Solution_> constraintFactory)
extends Record
implements PrecomputeFactory
-
Constructor Summary
ConstructorsConstructorDescriptionBavetStaticDataFactory(BavetConstraintFactory<Solution_> constraintFactory) Creates an instance of aBavetStaticDataFactoryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconstraintFactoryrecord component.final booleanIndicates whether some other object is "equal to" this one.<A> UniConstraintStream<A>forEachUnfiltered(Class<A> sourceClass) As defined byConstraintFactory.forEachUnfiltered(Class), with the additional change of any joining stream will also be unfiltered.<A> BiConstraintStream<A,A> forEachUnfilteredUniquePair(Class<A> sourceClass, BiJoiner<A, A>... joiners) final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface ai.timefold.solver.core.api.score.stream.PrecomputeFactory
forEachUnfilteredUniquePair, forEachUnfilteredUniquePair, forEachUnfilteredUniquePair, forEachUnfilteredUniquePair, forEachUnfilteredUniquePair
-
Constructor Details
-
BavetStaticDataFactory
Creates an instance of aBavetStaticDataFactoryrecord class.- Parameters:
constraintFactory- the value for theconstraintFactoryrecord component
-
-
Method Details
-
forEachUnfiltered
Description copied from interface:PrecomputeFactoryAs defined byConstraintFactory.forEachUnfiltered(Class), with the additional change of any joining stream will also be unfiltered.For example,
precomputeFactory.forEachUnfiltered(Shift.class) .join(Shift.class, Joiners.equal(Shift::getLocation));Would roughly be equivalent to
constraintFactory.forEachUnfiltered(Shift.class) .join(constraintFactory.forEachUnfiltered(Shift.class), Joiners.equal(Shift::getLocation));Important: no variables can be referenced in any operations performed by the returned
ConstraintStream, otherwise a score corruption will occur. See the note inConstraintFactory.precompute(Function)for more details.- Specified by:
forEachUnfilteredin interfacePrecomputeFactory- Type Parameters:
A- the type of the matched problem fact orplanning entity
-
forEachUnfilteredUniquePair
public <A> BiConstraintStream<A,A> forEachUnfilteredUniquePair(Class<A> sourceClass, BiJoiner<A, A>... joiners) Description copied from interface:PrecomputeFactoryAs defined byPrecomputeFactory.forEachUnfilteredUniquePair(Class, BiJoiner).This method causes Unchecked generics array creation for varargs parameter warnings, but we can't fix it with a
SafeVarargsannotation because it's an interface method. Therefore, there are overloaded methods with up to 4BiJoinerparameters.- Specified by:
forEachUnfilteredUniquePairin interfacePrecomputeFactory- Type Parameters:
A- the type of the matched problem fact orplanning entity- Returns:
- a stream that matches every unique combination of A and another A for which all the
joinersare true
-
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
constraintFactory
Returns the value of theconstraintFactoryrecord component.- Returns:
- the value of the
constraintFactoryrecord component
-