5
5
import ai .timefold .solver .core .api .domain .entity .PlanningPinToIndex ;
6
6
import ai .timefold .solver .core .api .domain .solution .ProblemFactCollectionProperty ;
7
7
import ai .timefold .solver .core .api .domain .variable .PlanningListVariable ;
8
- import ai .timefold .solver .core .api .score .stream .ConstraintStream ;
9
8
import ai .timefold .solver .core .impl .move .streams .maybeapi .UniDataFilter ;
10
9
import ai .timefold .solver .core .preview .api .domain .metamodel .GenuineVariableMetaModel ;
11
- import ai .timefold .solver .core .preview .api .domain .metamodel .PlanningVariableMetaModel ;
12
10
13
11
import org .jspecify .annotations .NullMarked ;
14
12
15
13
@ NullMarked
16
14
public interface MoveStreamFactory <Solution_ > {
17
15
18
16
/**
19
- * Start a {@link ConstraintStream} of all instances of the sourceClass
20
- * that are known as {@link ProblemFactCollectionProperty problem facts} or {@link PlanningEntity planning entities}.
17
+ * Start a {@link DataStream} of all instances of the sourceClass
18
+ * that are known as {@link ProblemFactCollectionProperty problem facts}
19
+ * or {@link PlanningEntity planning entities}.
21
20
* <p>
22
21
* If the sourceClass is a {@link PlanningEntity}, then it is automatically
23
- * {@link UniDataStream#filter(UniDataFilter)} filtered} to only contain entities
22
+ * {@link UniDataStream#filter(UniDataFilter) filtered} to only contain entities
24
23
* which are not pinned.
25
24
* <p>
26
25
* If the sourceClass is a shadow entity (an entity without any genuine planning variables),
@@ -31,7 +30,7 @@ public interface MoveStreamFactory<Solution_> {
31
30
* <p>
32
31
* This stream returns genuine entities regardless of whether they have any null genuine planning variables.
33
32
* This stream returns shadow entities regardless of whether they are assigned to any genuine entity.
34
- * They can easily be {@link UniDataStream#filter(UniDataFilter)} filtered out}.
33
+ * They can easily be {@link UniDataStream#filter(UniDataFilter) filtered out}.
35
34
*
36
35
* @return A stream containing a tuple for each of the entities as described above.
37
36
* @see PlanningPin An annotation to mark the entire entity as pinned.
@@ -42,8 +41,9 @@ public interface MoveStreamFactory<Solution_> {
42
41
<A > UniDataStream <Solution_ , A > enumerate (Class <A > sourceClass , boolean includeNull );
43
42
44
43
/**
45
- * Start a {@link ConstraintStream} of all instances of the sourceClass
46
- * that are known as {@link ProblemFactCollectionProperty problem facts} or {@link PlanningEntity planning entities}.
44
+ * Start a {@link DataStream} of all instances of the sourceClass
45
+ * that are known as {@link ProblemFactCollectionProperty problem facts}
46
+ * or {@link PlanningEntity planning entities}.
47
47
* If the sourceClass is a genuine or shadow entity,
48
48
* it returns instances regardless of their pinning status.
49
49
* Otherwise as defined by {@link #enumerate(Class, boolean)}.
@@ -60,7 +60,7 @@ public interface MoveStreamFactory<Solution_> {
60
60
* @return data stream with all possible values of a given variable
61
61
*/
62
62
default <Entity_ , Value_ > BiDataStream <Solution_ , Entity_ , Value_ > enumerateEntityValuePairs (
63
- PlanningVariableMetaModel <Solution_ , Entity_ , Value_ > variableMetaModel ) {
63
+ GenuineVariableMetaModel <Solution_ , Entity_ , Value_ > variableMetaModel ) {
64
64
return enumerateEntityValuePairs (variableMetaModel , enumerate (variableMetaModel .entity ().type (), false ));
65
65
}
66
66
0 commit comments