diff options
author | 2021-10-05 00:36:47 +0200 | |
---|---|---|
committer | 2021-10-05 00:36:47 +0200 | |
commit | c3e27396c62f191b4343df151e5a86bfa63a32f3 (patch) | |
tree | 4f698c9ba0320a5c740c53877c3f75c00240dca4 /store/src/main/java/org/eclipse/viatra/solver/data/query/building/PredicateAtom.java | |
parent | fix(web): improve accessibility (diff) | |
download | refinery-c3e27396c62f191b4343df151e5a86bfa63a32f3.tar.gz refinery-c3e27396c62f191b4343df151e5a86bfa63a32f3.tar.zst refinery-c3e27396c62f191b4343df151e5a86bfa63a32f3.zip |
chore: change package name
Diffstat (limited to 'store/src/main/java/org/eclipse/viatra/solver/data/query/building/PredicateAtom.java')
-rw-r--r-- | store/src/main/java/org/eclipse/viatra/solver/data/query/building/PredicateAtom.java | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/store/src/main/java/org/eclipse/viatra/solver/data/query/building/PredicateAtom.java b/store/src/main/java/org/eclipse/viatra/solver/data/query/building/PredicateAtom.java deleted file mode 100644 index 439298d0..00000000 --- a/store/src/main/java/org/eclipse/viatra/solver/data/query/building/PredicateAtom.java +++ /dev/null | |||
@@ -1,66 +0,0 @@ | |||
1 | package org.eclipse.viatra.solver.data.query.building; | ||
2 | |||
3 | import java.util.List; | ||
4 | import java.util.Map; | ||
5 | import java.util.Set; | ||
6 | |||
7 | public class PredicateAtom implements DNFAtom { | ||
8 | private DNFPredicate referred; | ||
9 | private List<Variable> substitution; | ||
10 | private boolean positive; | ||
11 | private boolean transitive; | ||
12 | |||
13 | public PredicateAtom(boolean positive, boolean transitive, DNFPredicate referred, List<Variable> substitution) { | ||
14 | this.positive = positive; | ||
15 | this.referred = referred; | ||
16 | this.substitution = substitution; | ||
17 | this.transitive = transitive; | ||
18 | } | ||
19 | |||
20 | public DNFPredicate getReferred() { | ||
21 | return referred; | ||
22 | } | ||
23 | |||
24 | public void setReferred(DNFPredicate referred) { | ||
25 | this.referred = referred; | ||
26 | } | ||
27 | |||
28 | public List<Variable> getSubstitution() { | ||
29 | return substitution; | ||
30 | } | ||
31 | |||
32 | public void setSubstitution(List<Variable> substitution) { | ||
33 | this.substitution = substitution; | ||
34 | } | ||
35 | |||
36 | public boolean isPositive() { | ||
37 | return positive; | ||
38 | } | ||
39 | |||
40 | public void setPositive(boolean positive) { | ||
41 | this.positive = positive; | ||
42 | } | ||
43 | |||
44 | public boolean isTransitive() { | ||
45 | return transitive; | ||
46 | } | ||
47 | |||
48 | public void setTransitive(boolean transitive) { | ||
49 | this.transitive = transitive; | ||
50 | } | ||
51 | |||
52 | @Override | ||
53 | public void unifyVariables(Map<String, Variable> variables) { | ||
54 | for (int i = 0; i < this.substitution.size(); i++) { | ||
55 | final Object term = this.substitution.get(i); | ||
56 | if (term instanceof Variable variableReference) { | ||
57 | this.substitution.set(i, DNFAtom.unifyVariables(variables, variableReference)); | ||
58 | } | ||
59 | } | ||
60 | } | ||
61 | |||
62 | @Override | ||
63 | public void collectAllVariables(Set<Variable> variables) { | ||
64 | DNFAtom.addToCollection(variables, substitution); | ||
65 | } | ||
66 | } | ||