Interface PrecomputeFactory
- All Known Implementing Classes:
BavetStaticDataFactory
ConstraintFactory, except its methods (and the
ConstraintStreams they return) do not apply any automatic
filters (like those mentioned in ConstraintFactory.forEach(Class)).-
Method Summary
Modifier and TypeMethodDescription<A> UniConstraintStream<A>forEachUnfiltered(Class<A> sourceClass) As defined byConstraintFactory.forEachUnfiltered(Class), with the additional change of any joining stream will also be unfiltered.default <A> BiConstraintStream<A,A> forEachUnfilteredUniquePair(Class<A> sourceClass) As defined byConstraintFactory.forEachUniquePair(Class), with the additional change that the problem facts/entities are unfiltered.default <A> BiConstraintStream<A,A> forEachUnfilteredUniquePair(Class<A> sourceClass, BiJoiner<A, A> joiner) As defined byConstraintFactory.forEachUniquePair(Class, BiJoiner), with the additional change that the problem facts/entities are unfiltered.<A> BiConstraintStream<A,A> forEachUnfilteredUniquePair(Class<A> sourceClass, BiJoiner<A, A>... joiners) As defined byforEachUnfilteredUniquePair(Class, BiJoiner).default <A> BiConstraintStream<A,A> forEachUnfilteredUniquePair(Class<A> sourceClass, BiJoiner<A, A> joiner1, BiJoiner<A, A> joiner2) As defined byforEachUnfilteredUniquePair(Class, BiJoiner).default <A> BiConstraintStream<A,A> forEachUnfilteredUniquePair(Class<A> sourceClass, BiJoiner<A, A> joiner1, BiJoiner<A, A> joiner2, BiJoiner<A, A> joiner3) As defined byforEachUnfilteredUniquePair(Class, BiJoiner).default <A> BiConstraintStream<A,A> forEachUnfilteredUniquePair(Class<A> sourceClass, BiJoiner<A, A> joiner1, BiJoiner<A, A> joiner2, BiJoiner<A, A> joiner3, BiJoiner<A, A> joiner4) As defined byforEachUnfilteredUniquePair(Class, BiJoiner).
-
Method Details
-
forEachUnfiltered
As 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.- Type Parameters:
A- the type of the matched problem fact orplanning entity
-
forEachUnfilteredUniquePair
As defined byConstraintFactory.forEachUniquePair(Class), with the additional change that the problem facts/entities are unfiltered.For example,
precomputeFactory.forEachUnfilteredUniquePair(Shift.class);
Would roughly be equivalent to
constraintFactory.forEachUnfiltered(Shift.class) .join(constraintFactory.forEachUnfiltered(Shift.class), Joiners.lessThan(Shift::getId));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.- Type Parameters:
A- the type of the matched problem fact orplanning entity
-
forEachUnfilteredUniquePair
default <A> BiConstraintStream<A,A> forEachUnfilteredUniquePair(Class<A> sourceClass, BiJoiner<A, A> joiner) As defined byConstraintFactory.forEachUniquePair(Class, BiJoiner), with the additional change that the problem facts/entities are unfiltered.For example,
precomputeFactory.forEachUnfilteredUniquePair(Shift.class, Joiners.equal(Shift::getLocation));
Would roughly be equivalent to
constraintFactory.forEachUnfiltered(Shift.class) .join(constraintFactory.forEachUnfiltered(Shift.class), Joiners.lessThan(Shift::getId), 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.- Type Parameters:
A- the type of the matched problem fact orplanning entity
-
forEachUnfilteredUniquePair
default <A> BiConstraintStream<A,A> forEachUnfilteredUniquePair(Class<A> sourceClass, BiJoiner<A, A> joiner1, BiJoiner<A, A> joiner2) As defined byforEachUnfilteredUniquePair(Class, BiJoiner).- 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
-
forEachUnfilteredUniquePair
default <A> BiConstraintStream<A,A> forEachUnfilteredUniquePair(Class<A> sourceClass, BiJoiner<A, A> joiner1, BiJoiner<A, A> joiner2, BiJoiner<A, A> joiner3) As defined byforEachUnfilteredUniquePair(Class, BiJoiner).- 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
-
forEachUnfilteredUniquePair
default <A> BiConstraintStream<A,A> forEachUnfilteredUniquePair(Class<A> sourceClass, BiJoiner<A, A> joiner1, BiJoiner<A, A> joiner2, BiJoiner<A, A> joiner3, BiJoiner<A, A> joiner4) As defined byforEachUnfilteredUniquePair(Class, BiJoiner).- 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
-
forEachUnfilteredUniquePair
<A> BiConstraintStream<A,A> forEachUnfilteredUniquePair(Class<A> sourceClass, BiJoiner<A, A>... joiners) As defined byforEachUnfilteredUniquePair(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.- 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
-