diff options
Diffstat (limited to 'subprojects/viatra-runtime-matchers/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/VolatileTuple.java')
-rw-r--r-- | subprojects/viatra-runtime-matchers/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/VolatileTuple.java | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/subprojects/viatra-runtime-matchers/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/VolatileTuple.java b/subprojects/viatra-runtime-matchers/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/VolatileTuple.java deleted file mode 100644 index 699105a5..00000000 --- a/subprojects/viatra-runtime-matchers/src/main/java/tools/refinery/viatra/runtime/matchers/tuple/VolatileTuple.java +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | /******************************************************************************* | ||
2 | * Copyright (c) 2010-2017 Zoltan Ujhelyi, IncQuery Labs | ||
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 | |||
10 | package tools.refinery.viatra.runtime.matchers.tuple; | ||
11 | |||
12 | /** | ||
13 | * Mutable tuple without explicit modification commands. In practical terms, the values stored in a volatile tuple can | ||
14 | * be changed without any notification. | ||
15 | * | ||
16 | * @author Zoltan Ujhelyi | ||
17 | * @since 1.7 | ||
18 | * | ||
19 | */ | ||
20 | public abstract class VolatileTuple extends AbstractTuple { | ||
21 | |||
22 | @Override | ||
23 | public boolean equals(Object obj) { | ||
24 | if (this == obj) | ||
25 | return true; | ||
26 | if (obj == null) | ||
27 | return false; | ||
28 | if (!(obj instanceof ITuple)) | ||
29 | return false; | ||
30 | final ITuple other = (ITuple) obj; | ||
31 | return internalEquals(other); | ||
32 | } | ||
33 | |||
34 | @Override | ||
35 | public int hashCode() { | ||
36 | return doCalcHash(); | ||
37 | } | ||
38 | |||
39 | /** | ||
40 | * Creates an immutable tuple from the values stored in the tuple. The created tuple will not be updated when the | ||
41 | * current tuple changes. | ||
42 | */ | ||
43 | @Override | ||
44 | public Tuple toImmutable() { | ||
45 | return Tuples.flatTupleOf(getElements()); | ||
46 | } | ||
47 | } | ||