blob: 59eeeefe93b129f4fa35b44f3bb2b66fd5ec94b0 (
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
25
26
27
28
29
30
31
32
|
package tools.refinery.store.reasoning.representation;
import tools.refinery.store.representation.AbstractDomain;
public record PartialFunction<A, C>(String name, int arity, AbstractDomain<A, C> abstractDomain)
implements AnyPartialFunction, PartialSymbol<A, C> {
@Override
public A defaultValue() {
return null;
}
@Override
public C defaultConcreteValue() {
return null;
}
@Override
public boolean equals(Object o) {
return this == o;
}
@Override
public int hashCode() {
// Compare by identity to make hash table lookups more efficient.
return System.identityHashCode(this);
}
@Override
public String toString() {
return "%s/%d".formatted(name, arity);
}
}
|