diff options
author | 2021-08-15 17:41:58 +0200 | |
---|---|---|
committer | 2021-08-15 17:41:58 +0200 | |
commit | 429711e05862e365b4015c325dee4c8171bba777 (patch) | |
tree | 00e535486c55265bf70684d1b68554cfc17e2cad /model-data | |
parent | Fixing CollectionsUtil visibility (diff) | |
download | refinery-429711e05862e365b4015c325dee4c8171bba777.tar.gz refinery-429711e05862e365b4015c325dee4c8171bba777.tar.zst refinery-429711e05862e365b4015c325dee4c8171bba777.zip |
:lipstick:
Diffstat (limited to 'model-data')
-rw-r--r-- | model-data/src/main/java/org/eclipse/viatra/solver/data/model/representation/RelationRepresentation.java | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/model-data/src/main/java/org/eclipse/viatra/solver/data/model/representation/RelationRepresentation.java b/model-data/src/main/java/org/eclipse/viatra/solver/data/model/representation/RelationRepresentation.java index 60e43692..6f01d8aa 100644 --- a/model-data/src/main/java/org/eclipse/viatra/solver/data/model/representation/RelationRepresentation.java +++ b/model-data/src/main/java/org/eclipse/viatra/solver/data/model/representation/RelationRepresentation.java | |||
@@ -4,14 +4,14 @@ import org.eclipse.viatra.solver.data.model.Tuple; | |||
4 | import org.eclipse.viatra.solver.data.model.TupleHashProvider; | 4 | import org.eclipse.viatra.solver.data.model.TupleHashProvider; |
5 | import org.eclipse.viatra.solver.data.model.symbols.Symbol; | 5 | import org.eclipse.viatra.solver.data.model.symbols.Symbol; |
6 | 6 | ||
7 | public class RelationRepresentation <D> extends DataRepresentation<Tuple,D> { | 7 | public class RelationRepresentation<D> extends DataRepresentation<Tuple, D> { |
8 | private final Symbol symbol; | 8 | private final Symbol symbol; |
9 | 9 | ||
10 | public RelationRepresentation(Symbol symbol,Class<D> domain, D defaultValue) { | 10 | public RelationRepresentation(Symbol symbol, Class<D> domain, D defaultValue) { |
11 | super(Tuple.class,TupleHashProvider.singleton(),domain,defaultValue); | 11 | super(Tuple.class, TupleHashProvider.singleton(), domain, defaultValue); |
12 | this.symbol = symbol; | 12 | this.symbol = symbol; |
13 | } | 13 | } |
14 | 14 | ||
15 | @Override | 15 | @Override |
16 | public String getName() { | 16 | public String getName() { |
17 | return symbol.getName(); | 17 | return symbol.getName(); |
@@ -20,11 +20,9 @@ public class RelationRepresentation <D> extends DataRepresentation<Tuple,D> { | |||
20 | public Symbol getSymbol() { | 20 | public Symbol getSymbol() { |
21 | return symbol; | 21 | return symbol; |
22 | } | 22 | } |
23 | 23 | ||
24 | @Override | 24 | @Override |
25 | public boolean isValidKey(Tuple key) { | 25 | public boolean isValidKey(Tuple key) { |
26 | return key.getSize() == symbol.getArity(); | 26 | return key.getSize() == symbol.getArity(); |
27 | } | 27 | } |
28 | |||
29 | |||
30 | } | 28 | } |