diff options
Diffstat (limited to 'subprojects/viatra-runtime-base/src/main/java/tools/refinery/viatra/runtime/base/api/IQueryResultUpdateListener.java')
-rw-r--r-- | subprojects/viatra-runtime-base/src/main/java/tools/refinery/viatra/runtime/base/api/IQueryResultUpdateListener.java | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/subprojects/viatra-runtime-base/src/main/java/tools/refinery/viatra/runtime/base/api/IQueryResultUpdateListener.java b/subprojects/viatra-runtime-base/src/main/java/tools/refinery/viatra/runtime/base/api/IQueryResultUpdateListener.java new file mode 100644 index 00000000..5addfd78 --- /dev/null +++ b/subprojects/viatra-runtime-base/src/main/java/tools/refinery/viatra/runtime/base/api/IQueryResultUpdateListener.java | |||
@@ -0,0 +1,45 @@ | |||
1 | /******************************************************************************* | ||
2 | * Copyright (c) 2010-2012, Abel Hegedus, Istvan Rath and Daniel Varro | ||
3 | * This program and the accompanying materials are made available under the | ||
4 | * terms of the Eclipse Public License v. 2.0 which is available at | ||
5 | * http://www.eclipse.org/legal/epl-v20.html. | ||
6 | * | ||
7 | * SPDX-License-Identifier: EPL-2.0 | ||
8 | *******************************************************************************/ | ||
9 | package tools.refinery.viatra.runtime.base.api; | ||
10 | |||
11 | /** | ||
12 | * Listener interface for receiving notification from {@link QueryResultMultimap} | ||
13 | * | ||
14 | * @author Abel Hegedus | ||
15 | * | ||
16 | * @param <KeyType> | ||
17 | * @param <ValueType> | ||
18 | */ | ||
19 | public interface IQueryResultUpdateListener<KeyType, ValueType> { | ||
20 | /** | ||
21 | * This method is called by the query result multimap when a new key-value pair is put into the multimap | ||
22 | * | ||
23 | * <p> | ||
24 | * Only invoked if the contents of the multimap changed! | ||
25 | * | ||
26 | * @param key | ||
27 | * the key of the newly inserted pair | ||
28 | * @param value | ||
29 | * the value of the newly inserted pair | ||
30 | */ | ||
31 | void notifyPut(KeyType key, ValueType value); | ||
32 | |||
33 | /** | ||
34 | * This method is called by the query result multimap when key-value pair is removed from the multimap | ||
35 | * | ||
36 | * <p> | ||
37 | * Only invoked if the contents of the multimap changed! | ||
38 | * | ||
39 | * @param key | ||
40 | * the key of the removed pair | ||
41 | * @param value | ||
42 | * the value of the removed pair | ||
43 | */ | ||
44 | void notifyRemove(KeyType key, ValueType value); | ||
45 | } \ No newline at end of file | ||