diff options
Diffstat (limited to 'subprojects/store-query/src/main')
-rw-r--r-- | subprojects/store-query/src/main/java/tools/refinery/store/query/literal/RepresentativeElectionLiteral.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/RepresentativeElectionLiteral.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/RepresentativeElectionLiteral.java index 5d57c06c..f6545f9f 100644 --- a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/RepresentativeElectionLiteral.java +++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/RepresentativeElectionLiteral.java | |||
@@ -6,6 +6,8 @@ | |||
6 | package tools.refinery.store.query.literal; | 6 | package tools.refinery.store.query.literal; |
7 | 7 | ||
8 | import tools.refinery.store.query.Constraint; | 8 | import tools.refinery.store.query.Constraint; |
9 | import tools.refinery.store.query.equality.LiteralEqualityHelper; | ||
10 | import tools.refinery.store.query.equality.LiteralHashCodeHelper; | ||
9 | import tools.refinery.store.query.substitution.Substitution; | 11 | import tools.refinery.store.query.substitution.Substitution; |
10 | import tools.refinery.store.query.term.NodeVariable; | 12 | import tools.refinery.store.query.term.NodeVariable; |
11 | import tools.refinery.store.query.term.ParameterDirection; | 13 | import tools.refinery.store.query.term.ParameterDirection; |
@@ -82,6 +84,20 @@ public class RepresentativeElectionLiteral extends AbstractCallLiteral { | |||
82 | } | 84 | } |
83 | 85 | ||
84 | @Override | 86 | @Override |
87 | public boolean equalsWithSubstitution(LiteralEqualityHelper helper, Literal other) { | ||
88 | if (!super.equalsWithSubstitution(helper, other)) { | ||
89 | return false; | ||
90 | } | ||
91 | var otherRepresentativeElectionLiteral = (RepresentativeElectionLiteral) other; | ||
92 | return connectivity.equals(otherRepresentativeElectionLiteral.connectivity); | ||
93 | } | ||
94 | |||
95 | @Override | ||
96 | public int hashCodeWithSubstitution(LiteralHashCodeHelper helper) { | ||
97 | return super.hashCodeWithSubstitution(helper) * 31 + connectivity.hashCode(); | ||
98 | } | ||
99 | |||
100 | @Override | ||
85 | public String toString() { | 101 | public String toString() { |
86 | var builder = new StringBuilder(); | 102 | var builder = new StringBuilder(); |
87 | builder.append("@Representative(\""); | 103 | builder.append("@Representative(\""); |