diff options
Diffstat (limited to 'subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/matcher/DRedReteBackendFactory.java')
-rw-r--r-- | subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/matcher/DRedReteBackendFactory.java | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/matcher/DRedReteBackendFactory.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/matcher/DRedReteBackendFactory.java new file mode 100644 index 00000000..83e86fe6 --- /dev/null +++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/matcher/DRedReteBackendFactory.java | |||
@@ -0,0 +1,49 @@ | |||
1 | /******************************************************************************* | ||
2 | * Copyright (c) 2010-2019, Tamas Szabo, 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.rete.matcher; | ||
10 | |||
11 | import tools.refinery.viatra.runtime.matchers.backend.IQueryBackend; | ||
12 | import tools.refinery.viatra.runtime.matchers.context.IQueryBackendContext; | ||
13 | |||
14 | /** | ||
15 | * A {@link ReteBackendFactory} implementation that creates {@link ReteEngine}s that use delete and re-derive | ||
16 | * evaluation. | ||
17 | * | ||
18 | * @author Tamas Szabo | ||
19 | * @since 2.2 | ||
20 | */ | ||
21 | public class DRedReteBackendFactory extends ReteBackendFactory { | ||
22 | |||
23 | public static final DRedReteBackendFactory INSTANCE = new DRedReteBackendFactory(); | ||
24 | |||
25 | @Override | ||
26 | public IQueryBackend create(IQueryBackendContext context) { | ||
27 | return create(context, true, null); | ||
28 | } | ||
29 | |||
30 | @Override | ||
31 | public int hashCode() { | ||
32 | return DRedReteBackendFactory.class.hashCode(); | ||
33 | } | ||
34 | |||
35 | @Override | ||
36 | public boolean equals(final Object obj) { | ||
37 | if (this == obj) { | ||
38 | return true; | ||
39 | } | ||
40 | if (obj == null) { | ||
41 | return false; | ||
42 | } | ||
43 | if (!(obj instanceof DRedReteBackendFactory)) { | ||
44 | return false; | ||
45 | } | ||
46 | return true; | ||
47 | } | ||
48 | |||
49 | } | ||