diff options
Diffstat (limited to 'subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/InferredMayTypeRelationView.java')
-rw-r--r-- | subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/InferredMayTypeRelationView.java | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/InferredMayTypeRelationView.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/InferredMayTypeRelationView.java new file mode 100644 index 00000000..12c37c86 --- /dev/null +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/typehierarchy/InferredMayTypeRelationView.java | |||
@@ -0,0 +1,19 @@ | |||
1 | package tools.refinery.store.reasoning.translator.typehierarchy; | ||
2 | |||
3 | import tools.refinery.store.reasoning.representation.PartialRelation; | ||
4 | import tools.refinery.store.query.view.TuplePreservingRelationView; | ||
5 | import tools.refinery.store.tuple.Tuple; | ||
6 | |||
7 | class InferredMayTypeRelationView extends TuplePreservingRelationView<InferredType> { | ||
8 | private final PartialRelation type; | ||
9 | |||
10 | InferredMayTypeRelationView(PartialRelation type) { | ||
11 | super(TypeHierarchyTranslationUnit.INFERRED_TYPE_SYMBOL, "%s#may".formatted(type)); | ||
12 | this.type = type; | ||
13 | } | ||
14 | |||
15 | @Override | ||
16 | public boolean filter(Tuple key, InferredType value) { | ||
17 | return value.mayConcreteTypes().contains(type); | ||
18 | } | ||
19 | } | ||