I'm just starting with Optaplanner and am trying to recreate the following example from the documentation (https://docs.optaplanner.org/7.37.0.Final/optaplanner-docs/html_single/index.html#_collecting_countdistinct):
private Constraint roomCount(ConstraintFactory factory) {
return factory.from(Talk.class)
.groupBy(Talk::getRoom, countDistinct())
.penalize("roomCount",
HardSoftScore.ONE_SOFT,
(room, count) -> ...);
}
... But there is no no-args #countDistinct() method overload in the ConstraintCollectors class.
There are ony only method overloads that accept a Function/BiFunction/TriFunction/QuadFunction respectively.
Am I importing the wrong class, or are there undocumented signature changes?