diff options
Diffstat (limited to 'subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/InferredMayTypeView.java')
-rw-r--r-- | subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/InferredMayTypeView.java | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/InferredMayTypeView.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/InferredMayTypeView.java index ce2d6ff3..40de4644 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/InferredMayTypeView.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/InferredMayTypeView.java | |||
@@ -9,6 +9,8 @@ import tools.refinery.store.reasoning.representation.PartialRelation; | |||
9 | import tools.refinery.store.query.view.TuplePreservingView; | 9 | import tools.refinery.store.query.view.TuplePreservingView; |
10 | import tools.refinery.store.tuple.Tuple; | 10 | import tools.refinery.store.tuple.Tuple; |
11 | 11 | ||
12 | import java.util.Objects; | ||
13 | |||
12 | class InferredMayTypeView extends TuplePreservingView<InferredType> { | 14 | class InferredMayTypeView extends TuplePreservingView<InferredType> { |
13 | private final PartialRelation type; | 15 | private final PartialRelation type; |
14 | 16 | ||
@@ -18,7 +20,21 @@ class InferredMayTypeView extends TuplePreservingView<InferredType> { | |||
18 | } | 20 | } |
19 | 21 | ||
20 | @Override | 22 | @Override |
21 | public boolean filter(Tuple key, InferredType value) { | 23 | protected boolean doFilter(Tuple key, InferredType value) { |
22 | return value.mayConcreteTypes().contains(type); | 24 | return value.mayConcreteTypes().contains(type); |
23 | } | 25 | } |
26 | |||
27 | @Override | ||
28 | public boolean equals(Object o) { | ||
29 | if (this == o) return true; | ||
30 | if (o == null || getClass() != o.getClass()) return false; | ||
31 | if (!super.equals(o)) return false; | ||
32 | InferredMayTypeView that = (InferredMayTypeView) o; | ||
33 | return Objects.equals(type, that.type); | ||
34 | } | ||
35 | |||
36 | @Override | ||
37 | public int hashCode() { | ||
38 | return Objects.hash(super.hashCode(), type); | ||
39 | } | ||
24 | } | 40 | } |