1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
/*
* SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
*
* SPDX-License-Identifier: EPL-2.0
*/
package tools.refinery.language.utils;
import tools.refinery.language.model.problem.*;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
public record RelationInfo(String name, ContainmentRole containmentRole, List<Parameter> parameters,
Multiplicity multiplicity, Relation opposite, Collection<Conjunction> bodies,
Collection<Assertion> assertions, Collection<TypeScope> typeScopes) {
public RelationInfo(String name, ContainmentRole containmentRole, List<Parameter> parameters,
Multiplicity multiplicity, Relation opposite, Collection<Conjunction> bodies) {
this(name, containmentRole, parameters, multiplicity, opposite, bodies, new ArrayList<>(), new ArrayList<>());
}
public boolean hasDefinition() {
return bodies != null && !bodies.isEmpty();
}
public int arity() {
return parameters.size();
}
}
|