blob: 6c995e3a5e85d6dbbe2f7958d5aa2a16ba53df66 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
/*
* SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
*
* SPDX-License-Identifier: EPL-2.0
*/
package tools.refinery.store.reasoning.translator.typehierarchy;
import tools.refinery.store.reasoning.representation.PartialRelation;
import tools.refinery.store.query.view.TuplePreservingRelationView;
import tools.refinery.store.tuple.Tuple;
class InferredMustTypeRelationView extends TuplePreservingRelationView<InferredType> {
private final PartialRelation type;
InferredMustTypeRelationView(PartialRelation type) {
super(TypeHierarchyTranslationUnit.INFERRED_TYPE_SYMBOL, "%s#must".formatted(type));
this.type = type;
}
@Override
public boolean filter(Tuple key, InferredType value) {
return value.mustTypes().contains(type);
}
}
|