diff options
Diffstat (limited to 'subprojects/store-dse/src/main/java/tools/refinery/store/dse/objectives/Fitness.java')
-rw-r--r-- | subprojects/store-dse/src/main/java/tools/refinery/store/dse/objectives/Fitness.java | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/objectives/Fitness.java b/subprojects/store-dse/src/main/java/tools/refinery/store/dse/objectives/Fitness.java deleted file mode 100644 index b1dc4442..00000000 --- a/subprojects/store-dse/src/main/java/tools/refinery/store/dse/objectives/Fitness.java +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | /******************************************************************************* | ||
2 | * Copyright (c) 2010-2014, Miklos Foldenyi, Andras Szabolcs Nagy, Abel Hegedus, Akos Horvath, Zoltan Ujhelyi and Daniel Varro | ||
3 | * Copyright (c) 2023 The Refinery Authors <https://refinery.tools/> | ||
4 | * This program and the accompanying materials are made available under the | ||
5 | * terms of the Eclipse Public License v. 2.0 which is available at | ||
6 | * http://www.eclipse.org/legal/epl-v20.html. | ||
7 | * | ||
8 | * SPDX-License-Identifier: EPL-2.0 | ||
9 | *******************************************************************************/ | ||
10 | package tools.refinery.store.dse.objectives; | ||
11 | |||
12 | import java.util.HashMap; | ||
13 | |||
14 | public class Fitness extends HashMap<String, Double> { | ||
15 | |||
16 | private boolean satisfiesHardObjectives; | ||
17 | |||
18 | public boolean isSatisfiesHardObjectives() { | ||
19 | return satisfiesHardObjectives; | ||
20 | } | ||
21 | |||
22 | public void setSatisfiesHardObjectives(boolean satisfiesHardObjectives) { | ||
23 | this.satisfiesHardObjectives = satisfiesHardObjectives; | ||
24 | } | ||
25 | |||
26 | @Override | ||
27 | public String toString() { | ||
28 | return super.toString() + " hardObjectives=" + satisfiesHardObjectives; | ||
29 | } | ||
30 | |||
31 | @Override | ||
32 | public boolean equals(Object other) { | ||
33 | if (other == null) return false; | ||
34 | if (getClass() != other.getClass()) return false; | ||
35 | if (!super.equals(other)) return false; | ||
36 | return satisfiesHardObjectives == ((Fitness) other).satisfiesHardObjectives; | ||
37 | } | ||
38 | |||
39 | @Override | ||
40 | public int hashCode() { | ||
41 | int h = super.hashCode(); | ||
42 | h = h * 31 + (satisfiesHardObjectives ? 1 : 0); | ||
43 | return h; | ||
44 | } | ||
45 | |||
46 | } | ||