diff options
author | 2024-06-28 00:29:07 +0200 | |
---|---|---|
committer | 2024-06-28 00:29:07 +0200 | |
commit | 8f64ac2df4c6a31ad95ea04fb23717c76557e9cd (patch) | |
tree | 3209d71646072e3918d1fed25ef47a3b244d862d /subprojects/store/src/main | |
parent | refactor(store): NeighborhoodCalculator API (diff) | |
download | refinery-8f64ac2df4c6a31ad95ea04fb23717c76557e9cd.tar.gz refinery-8f64ac2df4c6a31ad95ea04fb23717c76557e9cd.tar.zst refinery-8f64ac2df4c6a31ad95ea04fb23717c76557e9cd.zip |
fix(semantics): configure StateCoderAdapter
Diffstat (limited to 'subprojects/store/src/main')
-rw-r--r-- | subprojects/store/src/main/java/tools/refinery/store/statecoding/StateCoderBuilder.java | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/subprojects/store/src/main/java/tools/refinery/store/statecoding/StateCoderBuilder.java b/subprojects/store/src/main/java/tools/refinery/store/statecoding/StateCoderBuilder.java index 54650825..868eddfc 100644 --- a/subprojects/store/src/main/java/tools/refinery/store/statecoding/StateCoderBuilder.java +++ b/subprojects/store/src/main/java/tools/refinery/store/statecoding/StateCoderBuilder.java | |||
@@ -10,34 +10,38 @@ import tools.refinery.store.model.ModelStore; | |||
10 | import tools.refinery.store.representation.AnySymbol; | 10 | import tools.refinery.store.representation.AnySymbol; |
11 | import tools.refinery.store.tuple.Tuple1; | 11 | import tools.refinery.store.tuple.Tuple1; |
12 | 12 | ||
13 | import java.util.Arrays; | ||
14 | import java.util.Collection; | 13 | import java.util.Collection; |
15 | import java.util.List; | 14 | import java.util.List; |
16 | 15 | ||
17 | public interface StateCoderBuilder extends ModelAdapterBuilder { | 16 | public interface StateCoderBuilder extends ModelAdapterBuilder { |
18 | StateCoderBuilder exclude(AnySymbol symbol); | 17 | StateCoderBuilder exclude(AnySymbol symbol); |
18 | |||
19 | default StateCoderBuilder excludeAll(Collection<? extends AnySymbol> symbols) { | 19 | default StateCoderBuilder excludeAll(Collection<? extends AnySymbol> symbols) { |
20 | for(var symbol : symbols) { | 20 | for (var symbol : symbols) { |
21 | exclude(symbol); | 21 | exclude(symbol); |
22 | } | 22 | } |
23 | return this; | 23 | return this; |
24 | } | 24 | } |
25 | |||
25 | default StateCoderBuilder excludeAll(AnySymbol... symbols) { | 26 | default StateCoderBuilder excludeAll(AnySymbol... symbols) { |
26 | return excludeAll(List.of(symbols)); | 27 | return excludeAll(List.of(symbols)); |
27 | } | 28 | } |
28 | 29 | ||
29 | StateCoderBuilder individual(Tuple1 tuple); | 30 | StateCoderBuilder individual(Tuple1 tuple); |
30 | default StateCoderBuilder individual(Collection<Tuple1> tuple1s) { | 31 | |
31 | for(Tuple1 tuple : tuple1s){ | 32 | default StateCoderBuilder individuals(Collection<Tuple1> tuple1s) { |
33 | for (Tuple1 tuple : tuple1s) { | ||
32 | individual(tuple); | 34 | individual(tuple); |
33 | } | 35 | } |
34 | return this; | 36 | return this; |
35 | } | 37 | } |
38 | |||
36 | default StateCoderBuilder individuals(Tuple1... tuple1s) { | 39 | default StateCoderBuilder individuals(Tuple1... tuple1s) { |
37 | return individual(Arrays.stream(tuple1s).toList()); | 40 | return individuals(List.of(tuple1s)); |
38 | } | 41 | } |
39 | 42 | ||
40 | StateCoderBuilder stateCodeCalculatorFactory(StateCodeCalculatorFactory codeCalculatorFactory); | 43 | StateCoderBuilder stateCodeCalculatorFactory(StateCodeCalculatorFactory codeCalculatorFactory); |
44 | |||
41 | StateCoderBuilder stateEquivalenceChecker(StateEquivalenceChecker stateEquivalenceChecker); | 45 | StateCoderBuilder stateEquivalenceChecker(StateEquivalenceChecker stateEquivalenceChecker); |
42 | 46 | ||
43 | @Override | 47 | @Override |