blob: 88b98da8d8bc6bfa28d141afdebc13324a8593b1 (
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
33
34
|
/*
* SPDX-FileCopyrightText: 2021-2024 The Refinery Authors <https://refinery.tools/>
*
* SPDX-License-Identifier: EPL-2.0
*/
package tools.refinery.store.reasoning.representation;
import tools.refinery.logic.AbstractDomain;
import tools.refinery.logic.AbstractValue;
public record PartialFunction<A extends AbstractValue<A, C>, C>(
String name, int arity, AbstractDomain<A, C> abstractDomain) implements AnyPartialFunction,
PartialSymbol<A, C> {
@Override
public A defaultValue() {
return null;
}
@Override
public boolean equals(Object o) {
return this == o;
}
@Override
public int hashCode() {
// Compare by identity to make hash table look-ups more efficient.
return System.identityHashCode(this);
}
@Override
public String toString() {
return "%s/%d".formatted(name, arity);
}
}
|