Class InnerConstraintFactory<Solution_,Constraint_ extends Constraint>
java.lang.Object
ai.timefold.solver.core.impl.score.stream.common.InnerConstraintFactory<Solution_,Constraint_>
- All Implemented Interfaces:
ConstraintFactory
- Direct Known Subclasses:
BavetConstraintFactory
public abstract class InnerConstraintFactory<Solution_,Constraint_ extends Constraint>
extends Object
implements ConstraintFactory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<A> voidassertValidFromType(Class<A> fromType) buildConstraints(ConstraintProvider constraintProvider) <A> @NonNull BiConstraintStream<A,A> forEachUniquePair(@NonNull Class<A> sourceClass, BiJoiner<A, A> @NonNull ... joiners) As defined byConstraintFactory.forEachUniquePair(Class, BiJoiner).<A> @NonNull BiConstraintStream<A,A> fromUniquePair(@NonNull Class<A> fromClass, @NonNull BiJoiner<A, A>... joiners) This method is deprecated.abstract SolutionDescriptor<Solution_>Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ai.timefold.solver.core.api.score.stream.ConstraintFactory
forEach, forEachIncludingNullVars, forEachIncludingUnassigned, forEachUniquePair, forEachUniquePair, forEachUniquePair, forEachUniquePair, forEachUniquePair, from, fromUnfiltered, fromUniquePair, fromUniquePair, fromUniquePair, fromUniquePair, fromUniquePair, getDefaultConstraintPackage
-
Constructor Details
-
InnerConstraintFactory
public InnerConstraintFactory()
-
-
Method Details
-
forEachUniquePair
public <A> @NonNull BiConstraintStream<A,A> forEachUniquePair(@NonNull Class<A> sourceClass, BiJoiner<A, A> @NonNull ... joiners) Description copied from interface:ConstraintFactoryAs defined byConstraintFactory.forEachUniquePair(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:
forEachUniquePairin interfaceConstraintFactory- 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
-
fromUniquePair
public <A> @NonNull BiConstraintStream<A,A> fromUniquePair(@NonNull Class<A> fromClass, @NonNull BiJoiner<A, A>... joiners) Description copied from interface:ConstraintFactoryThis method is deprecated. Migrate uses of this method toConstraintFactory.forEachUniquePair(Class, BiJoiner...), but first understand that the same precautions apply as with the use ofConstraintFactory.from(Class).The original Javadoc of this method follows:
As defined by
ConstraintFactory.fromUniquePair(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:
fromUniquePairin interfaceConstraintFactory- 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
-
assertValidFromType
-
buildConstraints
-
getSolutionDescriptor
- Returns:
- never null
-