diff options
author | Kristóf Marussy <marussy@mit.bme.hu> | 2023-09-14 19:29:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-14 19:29:36 +0200 |
commit | 98ed3b6db5f4e51961a161050cc31c66015116e8 (patch) | |
tree | 8bfd6d9bc8d6ed23b9eb0f889dd40b6c24fe8f92 /subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/action/DeleteAction.java | |
parent | Merge pull request #38 from nagilooh/design-space-exploration (diff) | |
parent | Merge remote-tracking branch 'upstream/main' into partial-interpretation (diff) | |
download | refinery-98ed3b6db5f4e51961a161050cc31c66015116e8.tar.gz refinery-98ed3b6db5f4e51961a161050cc31c66015116e8.tar.zst refinery-98ed3b6db5f4e51961a161050cc31c66015116e8.zip |
Merge pull request #39 from kris7t/partial-interpretation
Implement partial interpretation based model generation
Diffstat (limited to 'subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/action/DeleteAction.java')
-rw-r--r-- | subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/action/DeleteAction.java | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/action/DeleteAction.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/action/DeleteAction.java deleted file mode 100644 index 9900390f..00000000 --- a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/internal/action/DeleteAction.java +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | /* | ||
2 | * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/> | ||
3 | * | ||
4 | * SPDX-License-Identifier: EPL-2.0 | ||
5 | */ | ||
6 | package tools.refinery.store.dse.internal.action; | ||
7 | |||
8 | import tools.refinery.store.dse.DesignSpaceExplorationAdapter; | ||
9 | import tools.refinery.store.model.Model; | ||
10 | import tools.refinery.store.tuple.Tuple; | ||
11 | |||
12 | public class DeleteAction implements AtomicAction { | ||
13 | |||
14 | private final ActionVariable variable; | ||
15 | private DesignSpaceExplorationAdapter dseAdapter; | ||
16 | |||
17 | public DeleteAction(ActionVariable variable) { | ||
18 | this.variable = variable; | ||
19 | } | ||
20 | |||
21 | @Override | ||
22 | public void fire(Tuple activation) { | ||
23 | dseAdapter.deleteObject(variable.getValue()); | ||
24 | } | ||
25 | |||
26 | @Override | ||
27 | public DeleteAction prepare(Model model) { | ||
28 | dseAdapter = model.getAdapter(DesignSpaceExplorationAdapter.class); | ||
29 | return this; | ||
30 | } | ||
31 | |||
32 | @Override | ||
33 | public boolean equalsWithSubstitution(AtomicAction other) { | ||
34 | if (other == null || getClass() != other.getClass()) { | ||
35 | return false; | ||
36 | } | ||
37 | var otherAction = (DeleteAction) other; | ||
38 | return this.variable.getClass() == otherAction.variable.getClass(); | ||
39 | } | ||
40 | } | ||