aboutsummaryrefslogtreecommitdiffstats
path: root/subprojects/store/src/main/java/tools/refinery/store/model/Interpretation.java
blob: 1b15e4cff70e3ec3aca5f170d3c4fd960c2fe512 (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
/*
 * SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
 *
 * SPDX-License-Identifier: EPL-2.0
 */
package tools.refinery.store.model;

import tools.refinery.store.map.Cursor;
import tools.refinery.store.map.DiffCursor;
import tools.refinery.store.map.Version;
import tools.refinery.store.representation.Symbol;
import tools.refinery.store.tuple.Tuple;

public non-sealed interface Interpretation<T> extends AnyInterpretation {
	@Override
	Symbol<T> getSymbol();

	T get(Tuple key);

	Cursor<Tuple, T> getAll();

	Cursor<Tuple, T> getAdjacent(int slot, int node);

	T put(Tuple key, T value);

	void putAll(Cursor<Tuple, T> cursor);

	DiffCursor<Tuple, T> getDiffCursor(Version to);

	void addListener(InterpretationListener<T> listener, boolean alsoWhenRestoring);

	void removeListener(InterpretationListener<T> listener);
}