blob: 95d651e6ebe486c83611fff0b989f0b90de842bc (
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
|
package tools.refinery.language.model.tests.utils;
import tools.refinery.language.model.problem.Atom;
import tools.refinery.language.model.problem.Literal;
import tools.refinery.language.model.problem.NegativeLiteral;
import tools.refinery.language.model.problem.ValueLiteral;
public record WrappedLiteral(Literal literal) {
public Literal get() {
return literal;
}
public WrappedAtom valueAtom() {
return new WrappedAtom(((ValueLiteral) literal).getAtom());
}
public WrappedAtom negated() {
return new WrappedAtom(((NegativeLiteral) literal).getAtom());
}
public WrappedArgument arg(int i) {
return new WrappedAtom((Atom) literal).arg(i);
}
}
|