Skip to content

Commit a19a642

Browse files
committed
fix bad refactor
1 parent 9790c05 commit a19a642

22 files changed

Lines changed: 62 additions & 62 deletions

core/src/main/java/ai/timefold/solver/core/api/score/ScoreExplanation.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,16 +80,16 @@ public interface ScoreExplanation<Solution_, Score_ extends Score<Score_>> {
8080
*
8181
* <ul>
8282
* <li>
83-
* With Constraint Streams, the user has an option to provide a custom constraintverifier mapping,
83+
* With Constraint Streams, the user has an option to provide a custom justification mapping,
8484
* implementing {@link ConstraintJustification}.
85-
* If provided, every {@link ConstraintMatch} of such constraint will be associated with this custom constraintverifier
85+
* If provided, every {@link ConstraintMatch} of such constraint will be associated with this custom justification
8686
* class.
87-
* Every constraint not associated with a custom constraintverifier class
87+
* Every constraint not associated with a custom justification class
8888
* will be associated with {@link DefaultConstraintJustification}.
8989
* </li>
9090
* <li>
9191
* With {@link ConstraintMatchAwareIncrementalScoreCalculator},
92-
* every {@link ConstraintMatch} will be associated with the constraintverifier class that the user created it with.
92+
* every {@link ConstraintMatch} will be associated with the justification class that the user created it with.
9393
* </li>
9494
* </ul>
9595
*
@@ -102,9 +102,9 @@ public interface ScoreExplanation<Solution_, Score_ extends Score<Score_>> {
102102
* Explains the {@link Score} of {@link #getScore()} for all constraints
103103
* justified with a given {@link ConstraintJustification} type.
104104
* Otherwise, as defined by {@link #getJustificationList()}.
105-
* May be empty, if the score explanation ran with constraintverifier support disabled.
105+
* May be empty, if the score explanation ran with justification support disabled.
106106
*
107-
* @return all constraint matches associated with the given constraintverifier class
107+
* @return all constraint matches associated with the given justification class
108108
* @see #getIndictmentMap()
109109
*/
110110
default <ConstraintJustification_ extends ConstraintJustification> List<ConstraintJustification_>

core/src/main/java/ai/timefold/solver/core/api/score/analysis/ConstraintAnalysis.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,9 @@ private static int getMatchCount(ConstraintAnalysis<?> analysis, ConstraintAnaly
160160
for (var matchAnalysis : matchAnalyses) {
161161
var previous = matchAnalysisMap.put(matchAnalysis.justification(), matchAnalysis);
162162
if (previous != null) {
163-
// Match analysis for the same constraintverifier should have been merged already.
163+
// Match analysis for the same justification should have been merged already.
164164
throw new IllegalStateException(
165-
"Impossible state: multiple constraint matches (%s, %s) have the same constraintverifier (%s)."
165+
"Impossible state: multiple constraint matches (%s, %s) have the same justification (%s)."
166166
.formatted(previous, matchAnalysis, matchAnalysis.justification()));
167167
}
168168
}

core/src/main/java/ai/timefold/solver/core/api/score/analysis/MatchAnalysis.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ public record MatchAnalysis<Score_ extends Score<Score_>>(ConstraintRef constrai
2323
public MatchAnalysis {
2424
Objects.requireNonNull(constraintRef);
2525
Objects.requireNonNull(score);
26-
// Null constraintverifier is impossible;
27-
// if the fetch policy doesn't requre match analysis, the code shouldn't even get here.
26+
// Null justification is impossible;
27+
// if the fetch policy doesn't require match analysis, the code shouldn't even get here.
2828
Objects.requireNonNull(justification, () -> """
2929
Impossible state: Received a null justification.
3030
Maybe check your %s's justifyWith() implementation for that constraint?"""

core/src/main/java/ai/timefold/solver/core/api/score/constraint/ConstraintMatch.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,15 @@ public ConstraintRef getConstraintRef() {
5454
}
5555

5656
/**
57-
* Return a singular constraintverifier for the constraint.
57+
* Return a singular justification for the constraint.
5858
* <p>
5959
* This method has a different meaning based on which score director the constraint comes from.
6060
* <ul>
6161
* <li>For constraint streams, it returns {@link DefaultConstraintJustification} from the matching tuple
62-
* (eg. [A, B] for a bi stream), unless a custom constraintverifier mapping was provided,
62+
* (eg. [A, B] for a bi stream), unless a custom justification mapping was provided,
6363
* in which case it returns the return value of that function.</li>
6464
* <li>For incremental score calculation, it returns what the calculator is implemented to return.</li>
65-
* <li>It may return null, if constraintverifier support was disabled altogether.</li>
65+
* <li>It may return null, if justification support was disabled altogether.</li>
6666
* </ul>
6767
*/
6868
@SuppressWarnings("unchecked")
@@ -79,7 +79,7 @@ public ConstraintRef getConstraintRef() {
7979
* (eg. [A, B] for a bi stream), unless a custom indictment mapping was provided,
8080
* in which case it returns the return value of that function.</li>
8181
* <li>For incremental score calculation, it returns what the calculator is implemented to return.</li>
82-
* <li>It may return an empty list, if constraintverifier support was disabled altogether.</li>
82+
* <li>It may return an empty list, if justification support was disabled altogether.</li>
8383
* </ul>
8484
*
8585
* @return may be empty or contain null

core/src/main/java/ai/timefold/solver/core/api/score/constraint/Indictment.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ default int getConstraintMatchCount() {
5050

5151
/**
5252
* Retrieve {@link ConstraintJustification} instances associated with {@link ConstraintMatch}es in
53-
* {@link #getConstraintMatchSet()}, which are of (or extend) a given constraint constraintverifier implementation.
53+
* {@link #getConstraintMatchSet()}, which are of (or extend) a given constraint justification implementation.
5454
* This is equivalent to retrieving {@link #getConstraintMatchSet()}
5555
* and collecting all matching {@link ConstraintMatch#getJustification()} objects into a list.
5656
*

core/src/main/java/ai/timefold/solver/core/api/score/stream/ConstraintBuilder.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public interface ConstraintBuilder {
1111
* Builds a {@link Constraint} from the constraint stream.
1212
* The constraint will be placed in the {@link Constraint#DEFAULT_CONSTRAINT_GROUP default constraint group}.
1313
*
14-
* @param constraintName shows up in {@link ConstraintMatchTotal} during score constraintverifier
14+
* @param constraintName shows up in {@link ConstraintMatchTotal} during score justification
1515
*/
1616
default Constraint asConstraint(String constraintName) {
1717
return asConstraintDescribed(constraintName, "");
@@ -21,7 +21,7 @@ default Constraint asConstraint(String constraintName) {
2121
* As defined by {@link #asConstraintDescribed(String, String, String)},
2222
* placing the constraint in the {@link Constraint#DEFAULT_CONSTRAINT_GROUP default constraint group}.
2323
*
24-
* @param constraintName shows up in {@link ConstraintMatchTotal} during score constraintverifier
24+
* @param constraintName shows up in {@link ConstraintMatchTotal} during score justification
2525
* @param constraintDescription can contain any character, but it is recommended to keep it short and concise.
2626
*/
2727
default Constraint asConstraintDescribed(String constraintName, String constraintDescription) {
@@ -38,7 +38,7 @@ default Constraint asConstraintDescribed(String constraintName, String constrain
3838
* the constraint description is unlikely to be used externally as an identifier,
3939
* and therefore doesn't need to be URL-friendly, or protected against injection attacks.
4040
*
41-
* @param constraintName shows up in {@link ConstraintMatchTotal} during score constraintverifier
41+
* @param constraintName shows up in {@link ConstraintMatchTotal} during score justification
4242
* @param constraintDescription can contain any character, but it is recommended to keep it short and concise.
4343
* @param constraintGroup not used by the solver directly, but may be used by external tools to group constraints together,
4444
* such as by their source or by their purpose

core/src/main/java/ai/timefold/solver/core/api/score/stream/ConstraintJustification.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*
2121
* <p>
2222
* If two instances of this class are {@link Object#equals(Object) equal},
23-
* they are considered to be the same constraintverifier.
23+
* they are considered to be the same justification.
2424
* This matters in case of {@link SolutionManager#analyze(Object)} score analysis
2525
* where such justifications are grouped together.
2626
* This situation is likely to occur in case a {@link ConstraintStream} produces duplicate tuples,

core/src/main/java/ai/timefold/solver/core/api/score/stream/DefaultConstraintJustification.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
/**
1515
* Default implementation of {@link ConstraintJustification}, returned by {@link ConstraintMatch#getJustification()}
16-
* unless the user defined a custom constraintverifier mapping.
16+
* unless the user defined a custom justification mapping.
1717
*/
1818
public final class DefaultConstraintJustification
1919
implements ConstraintJustification, Comparable<DefaultConstraintJustification> {

core/src/main/java/ai/timefold/solver/core/api/score/stream/bi/BiConstraintBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
* To build the constraint, use one of the terminal operations, such as {@link #asConstraint(String)}.
2020
* <p>
2121
* Unless {@link #justifyWith(TriFunction)} is called,
22-
* the default constraintverifier mapping will be used.
22+
* the default justification mapping will be used.
2323
* The function takes the input arguments and converts them into a {@link java.util.List}.
2424
* <p>
2525
* Unless {@link #indictWith(BiFunction)} is called, the default indicted objects' mapping will be used.

core/src/main/java/ai/timefold/solver/core/api/score/stream/quad/QuadConstraintBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
* Used to build a {@link Constraint} out of a {@link QuadConstraintStream}, applying optional configuration.
1919
* To build the constraint, use one of the terminal operations, such as {@link #asConstraint(String)}.
2020
* <p>
21-
* Unless {@link #justifyWith(PentaFunction)} is called, the default constraintverifier mapping will be used.
21+
* Unless {@link #justifyWith(PentaFunction)} is called, the default justification mapping will be used.
2222
* The function takes the input arguments and converts them into a {@link java.util.List}.
2323
* <p>
2424
* Unless {@link #indictWith(QuadFunction)} is called, the default indicted objects' mapping will be used.

0 commit comments

Comments
 (0)