commit b0efa87799acf7e913671846ec74f3fc41fefc4f
Author: Simon Legner <Simon.Legner@gmail.com>
Date: 2020-03-15 16:11:25 +0100
xxx
diff --git a/src/org/openstreetmap/josm/data/gpx/GpxRoute.java b/src/org/openstreetmap/josm/data/gpx/GpxRoute.java
index 543f0590a..b519eab4c 100644
|
a
|
b
|
|
| 3 | 3 | |
| 4 | 4 | import java.util.Collection; |
| 5 | 5 | import java.util.LinkedList; |
| | 6 | import java.util.Objects; |
| 6 | 7 | |
| 7 | 8 | /** |
| 8 | 9 | * A route is a part of a GPX file containing of multiple GPX points. |
| … |
… |
|
| 17 | 18 | |
| 18 | 19 | @Override |
| 19 | 20 | public int hashCode() { |
| 20 | | return 31 * super.hashCode() + ((routePoints == null) ? 0 : routePoints.hashCode()); |
| | 21 | return Objects.hash(super.hashCode(), routePoints); |
| 21 | 22 | } |
| 22 | 23 | |
| 23 | 24 | @Override |
| … |
… |
public boolean equals(Object obj) {
|
| 29 | 30 | if (getClass() != obj.getClass()) |
| 30 | 31 | return false; |
| 31 | 32 | GpxRoute other = (GpxRoute) obj; |
| 32 | | if (routePoints == null) { |
| 33 | | if (other.routePoints != null) |
| 34 | | return false; |
| 35 | | } else if (!routePoints.equals(other.routePoints)) |
| 36 | | return false; |
| 37 | | return true; |
| | 33 | return Objects.equals(routePoints, other.routePoints); |
| 38 | 34 | } |
| 39 | 35 | } |
diff --git a/src/org/openstreetmap/josm/data/gpx/GpxTrack.java b/src/org/openstreetmap/josm/data/gpx/GpxTrack.java
index f78adc63b..d29c82793 100644
|
a
|
b
|
|
| 9 | 9 | import java.util.List; |
| 10 | 10 | import java.util.Map; |
| 11 | 11 | import java.util.Map.Entry; |
| | 12 | import java.util.Objects; |
| 12 | 13 | import java.util.Optional; |
| 13 | 14 | |
| 14 | 15 | import org.openstreetmap.josm.data.Bounds; |
| … |
… |
public double length() {
|
| 211 | 212 | |
| 212 | 213 | @Override |
| 213 | 214 | public int hashCode() { |
| 214 | | return 31 * super.hashCode() + ((segments == null) ? 0 : segments.hashCode()); |
| | 215 | return Objects.hash(segments); |
| 215 | 216 | } |
| 216 | 217 | |
| 217 | 218 | @Override |
| … |
… |
public boolean equals(Object obj) {
|
| 225 | 226 | if (getClass() != obj.getClass()) |
| 226 | 227 | return false; |
| 227 | 228 | GpxTrack other = (GpxTrack) obj; |
| 228 | | if (segments == null) { |
| 229 | | if (other.segments != null) |
| 230 | | return false; |
| 231 | | } else if (!segments.equals(other.segments)) |
| 232 | | return false; |
| 233 | | return true; |
| | 229 | return Objects.equals(segments, other.segments); |
| 234 | 230 | } |
| 235 | 231 | |
| 236 | 232 | @Override |
diff --git a/src/org/openstreetmap/josm/data/gpx/GpxTrackSegment.java b/src/org/openstreetmap/josm/data/gpx/GpxTrackSegment.java
index 87cb2e90f..9cfd0ec0e 100644
|
a
|
b
|
|
| 5 | 5 | import java.util.Collection; |
| 6 | 6 | import java.util.Collections; |
| 7 | 7 | import java.util.List; |
| | 8 | import java.util.Objects; |
| 8 | 9 | |
| 9 | 10 | import org.openstreetmap.josm.data.Bounds; |
| 10 | 11 | |
| … |
… |
public int getUpdateCount() {
|
| 77 | 78 | |
| 78 | 79 | @Override |
| 79 | 80 | public int hashCode() { |
| 80 | | final int prime = 31; |
| 81 | | int result = prime + super.hashCode(); |
| 82 | | result = prime * result + ((wayPoints == null) ? 0 : wayPoints.hashCode()); |
| 83 | | return result; |
| | 81 | return Objects.hash(super.hashCode(), wayPoints); |
| 84 | 82 | } |
| 85 | 83 | |
| 86 | 84 | @Override |
| … |
… |
public boolean equals(Object obj) {
|
| 94 | 92 | if (getClass() != obj.getClass()) |
| 95 | 93 | return false; |
| 96 | 94 | GpxTrackSegment other = (GpxTrackSegment) obj; |
| 97 | | if (wayPoints == null) { |
| 98 | | if (other.wayPoints != null) |
| 99 | | return false; |
| 100 | | } else if (!wayPoints.equals(other.wayPoints)) |
| 101 | | return false; |
| 102 | | return true; |
| | 95 | return Objects.equals(wayPoints, other.wayPoints); |
| 103 | 96 | } |
| 104 | 97 | } |
diff --git a/src/org/openstreetmap/josm/data/preferences/AbstractProperty.java b/src/org/openstreetmap/josm/data/preferences/AbstractProperty.java
index 07a10e0c9..4453e979a 100644
|
a
|
b
|
|
| 1 | 1 | // License: GPL. For details, see LICENSE file. |
| 2 | 2 | package org.openstreetmap.josm.data.preferences; |
| 3 | 3 | |
| | 4 | import java.util.Objects; |
| | 5 | |
| 4 | 6 | import org.openstreetmap.josm.spi.preferences.Config; |
| 5 | 7 | import org.openstreetmap.josm.spi.preferences.IPreferences; |
| 6 | 8 | import org.openstreetmap.josm.spi.preferences.PreferenceChangeEvent; |
| … |
… |
public void preferenceChanged(PreferenceChangeEvent e) {
|
| 28 | 30 | |
| 29 | 31 | @Override |
| 30 | 32 | public int hashCode() { |
| 31 | | final int prime = 31; |
| 32 | | int result = 1; |
| 33 | | result = prime * result + getOuterType().hashCode(); |
| 34 | | result = prime * result + ((listener == null) ? 0 : listener.hashCode()); |
| 35 | | return result; |
| | 33 | return Objects.hash(getOuterType(), listener); |
| 36 | 34 | } |
| 37 | 35 | |
| 38 | 36 | @Override |
| … |
… |
protected void removeListenerImpl(PreferenceChangedListener adapter) {
|
| 317 | 315 | |
| 318 | 316 | @Override |
| 319 | 317 | public int hashCode() { |
| 320 | | final int prime = 31; |
| 321 | | int result = 1; |
| 322 | | result = prime * result + ((key == null) ? 0 : key.hashCode()); |
| 323 | | result = prime * result + ((preferences == null) ? 0 : preferences.hashCode()); |
| 324 | | return result; |
| | 318 | return Objects.hash(key, preferences); |
| 325 | 319 | } |
| 326 | 320 | |
| 327 | 321 | @Override |
| … |
… |
public boolean equals(Object obj) {
|
| 331 | 325 | if (obj == null || getClass() != obj.getClass()) |
| 332 | 326 | return false; |
| 333 | 327 | AbstractProperty<?> other = (AbstractProperty<?>) obj; |
| 334 | | if (key == null) { |
| 335 | | if (other.key != null) |
| 336 | | return false; |
| 337 | | } else if (!key.equals(other.key)) |
| 338 | | return false; |
| 339 | | if (preferences == null) { |
| 340 | | if (other.preferences != null) |
| 341 | | return false; |
| 342 | | } else if (!preferences.equals(other.preferences)) |
| 343 | | return false; |
| 344 | | return true; |
| | 328 | return Objects.equals(key, other.key) && Objects.equals(preferences, other.preferences); |
| 345 | 329 | } |
| 346 | 330 | } |
diff --git a/src/org/openstreetmap/josm/data/tagging/ac/AutoCompletionItem.java b/src/org/openstreetmap/josm/data/tagging/ac/AutoCompletionItem.java
index 0430a6c88..f0918911c 100644
|
a
|
b
|
|
| 1 | 1 | // License: GPL. For details, see LICENSE file. |
| 2 | 2 | package org.openstreetmap.josm.data.tagging.ac; |
| 3 | 3 | |
| | 4 | import java.util.Objects; |
| | 5 | |
| 4 | 6 | /** |
| 5 | 7 | * Represents an entry in the set of auto completion values. |
| 6 | 8 | * |
| … |
… |
public String toString() {
|
| 85 | 87 | |
| 86 | 88 | @Override |
| 87 | 89 | public int hashCode() { |
| 88 | | final int prime = 31; |
| 89 | | int result = 1; |
| 90 | | result = prime * result |
| 91 | | + ((priority == null) ? 0 : priority.hashCode()); |
| 92 | | result = prime * result + ((value == null) ? 0 : value.hashCode()); |
| 93 | | return result; |
| | 90 | return Objects.hash(priority, value); |
| 94 | 91 | } |
| 95 | 92 | |
| 96 | 93 | @Override |
| … |
… |
public boolean equals(Object obj) {
|
| 104 | 101 | if (getClass() != obj.getClass()) |
| 105 | 102 | return false; |
| 106 | 103 | final AutoCompletionItem other = (AutoCompletionItem) obj; |
| 107 | | if (priority == null) { |
| 108 | | if (other.priority != null) |
| 109 | | return false; |
| 110 | | } else if (!priority.equals(other.priority)) |
| 111 | | return false; |
| 112 | | if (value == null) { |
| 113 | | if (other.value != null) |
| 114 | | return false; |
| 115 | | } else if (!value.equals(other.value)) |
| 116 | | return false; |
| 117 | | return true; |
| | 104 | return Objects.equals(priority, other.priority) && Objects.equals(value, other.value); |
| 118 | 105 | } |
| 119 | 106 | |
| 120 | 107 | @Override |
diff --git a/src/org/openstreetmap/josm/gui/layer/geoimage/ImageEntry.java b/src/org/openstreetmap/josm/gui/layer/geoimage/ImageEntry.java
index c7fa2f46b..29a37490b 100644
|
a
|
b
|
public void loadThumbnail() {
|
| 76 | 76 | |
| 77 | 77 | @Override |
| 78 | 78 | public int hashCode() { |
| 79 | | return 31 * super.hashCode() + ((thumbnail == null) ? 0 : thumbnail.hashCode()); |
| | 79 | return Objects.hash(thumbnail); |
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | @Override |
diff --git a/src/org/openstreetmap/josm/gui/mappaint/styleelement/AreaIconElement.java b/src/org/openstreetmap/josm/gui/mappaint/styleelement/AreaIconElement.java
index fb5fbf1ee..26900b503 100644
|
a
|
b
|
public static AreaIconElement create(final Environment env) {
|
| 71 | 71 | |
| 72 | 72 | @Override |
| 73 | 73 | public int hashCode() { |
| 74 | | final int prime = 31; |
| 75 | | int result = super.hashCode(); |
| 76 | | result = prime * result + ((iconImage == null) ? 0 : iconImage.hashCode()); |
| 77 | | result = prime * result + ((iconImageAngle == null) ? 0 : iconImageAngle.hashCode()); |
| 78 | | result = prime * result + ((iconPosition == null) ? 0 : iconPosition.hashCode()); |
| 79 | | return result; |
| | 74 | return Objects.hash(iconImage, iconImageAngle, iconPosition); |
| 80 | 75 | } |
| 81 | 76 | |
| 82 | 77 | @Override |
diff --git a/src/org/openstreetmap/josm/gui/mappaint/styleelement/placement/CompletelyInsideAreaStrategy.java b/src/org/openstreetmap/josm/gui/mappaint/styleelement/placement/CompletelyInsideAreaStrategy.java
index f1c8ccbab..dcbd712c0 100644
|
a
|
b
|
|
| 4 | 4 | import java.awt.Rectangle; |
| 5 | 5 | import java.awt.geom.Point2D; |
| 6 | 6 | import java.awt.geom.Rectangle2D; |
| | 7 | import java.util.Objects; |
| 7 | 8 | |
| 8 | 9 | import org.openstreetmap.josm.gui.MapViewState; |
| 9 | 10 | import org.openstreetmap.josm.gui.draw.MapViewPath; |
diff --git a/src/org/openstreetmap/josm/gui/preferences/advanced/PrefEntry.java b/src/org/openstreetmap/josm/gui/preferences/advanced/PrefEntry.java
index 2801fb3a8..406ec7d89 100644
|
a
|
b
|
|
| 1 | 1 | // License: GPL. For details, see LICENSE file. |
| 2 | 2 | package org.openstreetmap.josm.gui.preferences.advanced; |
| 3 | 3 | |
| | 4 | import java.util.Objects; |
| | 5 | |
| 4 | 6 | import org.openstreetmap.josm.spi.preferences.Setting; |
| 5 | 7 | import org.openstreetmap.josm.tools.CheckParameterUtil; |
| 6 | 8 | |
| … |
… |
public int compareTo(PrefEntry other) {
|
| 105 | 107 | |
| 106 | 108 | @Override |
| 107 | 109 | public int hashCode() { |
| 108 | | return 31 + ((key == null) ? 0 : key.hashCode()); |
| | 110 | return Objects.hash(key); |
| 109 | 111 | } |
| 110 | 112 | |
| 111 | 113 | @Override |
| … |
… |
public boolean equals(Object obj) {
|
| 115 | 117 | if (obj == null || getClass() != obj.getClass()) |
| 116 | 118 | return false; |
| 117 | 119 | PrefEntry other = (PrefEntry) obj; |
| 118 | | if (key == null) { |
| 119 | | if (other.key != null) |
| 120 | | return false; |
| 121 | | } else if (!key.equals(other.key)) |
| 122 | | return false; |
| 123 | | return true; |
| | 120 | return Objects.equals(key, other.key); |
| 124 | 121 | } |
| 125 | 122 | |
| 126 | 123 | @Override |
diff --git a/src/org/openstreetmap/josm/plugins/PluginHandler.java b/src/org/openstreetmap/josm/plugins/PluginHandler.java
index 264e6f132..0941b81ea 100644
|
a
|
b
|
|
| 32 | 32 | import java.util.Locale; |
| 33 | 33 | import java.util.Map; |
| 34 | 34 | import java.util.Map.Entry; |
| | 35 | import java.util.Objects; |
| 35 | 36 | import java.util.Set; |
| 36 | 37 | import java.util.TreeSet; |
| 37 | 38 | import java.util.concurrent.ExecutionException; |
| … |
… |
public DeprecatedPlugin(String name, String reason) {
|
| 222 | 223 | |
| 223 | 224 | @Override |
| 224 | 225 | public int hashCode() { |
| 225 | | final int prime = 31; |
| 226 | | int result = prime + ((name == null) ? 0 : name.hashCode()); |
| 227 | | return prime * result + ((reason == null) ? 0 : reason.hashCode()); |
| | 226 | return Objects.hash(name, reason); |
| 228 | 227 | } |
| 229 | 228 | |
| 230 | 229 | @Override |
| … |
… |
public boolean equals(Object obj) {
|
| 236 | 235 | if (getClass() != obj.getClass()) |
| 237 | 236 | return false; |
| 238 | 237 | DeprecatedPlugin other = (DeprecatedPlugin) obj; |
| 239 | | if (name == null) { |
| 240 | | if (other.name != null) |
| 241 | | return false; |
| 242 | | } else if (!name.equals(other.name)) |
| 243 | | return false; |
| 244 | | if (reason == null) { |
| 245 | | if (other.reason != null) |
| 246 | | return false; |
| 247 | | } else if (!reason.equals(other.reason)) |
| 248 | | return false; |
| 249 | | return true; |
| | 238 | return Objects.equals(name, other.name) && Objects.equals(reason, other.reason); |
| 250 | 239 | } |
| 251 | 240 | |
| 252 | 241 | @Override |
diff --git a/src/org/openstreetmap/josm/tools/ListenerList.java b/src/org/openstreetmap/josm/tools/ListenerList.java
index 6dce4ae1c..7df4bf551 100644
|
a
|
b
|
public boolean equals(Object obj) {
|
| 49 | 49 | |
| 50 | 50 | @Override |
| 51 | 51 | public int hashCode() { |
| 52 | | T l = listener.get(); |
| 53 | | if (l == null) { |
| 54 | | return 0; |
| 55 | | } else { |
| 56 | | return l.hashCode(); |
| 57 | | } |
| | 52 | return Objects.hash(listener.get()); |
| 58 | 53 | } |
| 59 | 54 | |
| 60 | 55 | @Override |
diff --git a/src/org/openstreetmap/josm/tools/template_engine/CompoundTemplateEntry.java b/src/org/openstreetmap/josm/tools/template_engine/CompoundTemplateEntry.java
index 1f859ea2e..5afb49b31 100644
|
a
|
b
|
|
| 2 | 2 | package org.openstreetmap.josm.tools.template_engine; |
| 3 | 3 | |
| 4 | 4 | import java.util.Arrays; |
| | 5 | import java.util.Objects; |
| 5 | 6 | |
| 6 | 7 | /** |
| 7 | 8 | * {@link TemplateEntry} that concatenates several templates. |
diff --git a/src/org/openstreetmap/josm/tools/template_engine/Condition.java b/src/org/openstreetmap/josm/tools/template_engine/Condition.java
index 8c0c8c05b..0bbab605b 100644
|
a
|
b
|
|
| 4 | 4 | import java.util.ArrayList; |
| 5 | 5 | import java.util.Collection; |
| 6 | 6 | import java.util.List; |
| | 7 | import java.util.Objects; |
| 7 | 8 | |
| 8 | 9 | /** |
| 9 | 10 | * {@link TemplateEntry} that applies other templates based on conditions. |
| … |
… |
public String toString() {
|
| 73 | 74 | |
| 74 | 75 | @Override |
| 75 | 76 | public int hashCode() { |
| 76 | | return 31 + ((entries == null) ? 0 : entries.hashCode()); |
| | 77 | return 31 + entries.hashCode(); |
| 77 | 78 | } |
| 78 | 79 | |
| 79 | 80 | @Override |
| … |
… |
public boolean equals(Object obj) {
|
| 83 | 84 | if (obj == null || getClass() != obj.getClass()) |
| 84 | 85 | return false; |
| 85 | 86 | Condition other = (Condition) obj; |
| 86 | | if (entries == null) { |
| 87 | | if (other.entries != null) |
| 88 | | return false; |
| 89 | | } else if (!entries.equals(other.entries)) |
| 90 | | return false; |
| 91 | | return true; |
| | 87 | return Objects.equals(entries, other.entries); |
| 92 | 88 | } |
| 93 | 89 | } |
diff --git a/src/org/openstreetmap/josm/tools/template_engine/ContextSwitchTemplate.java b/src/org/openstreetmap/josm/tools/template_engine/ContextSwitchTemplate.java
index 2ffe6d895..653958db3 100644
|
a
|
b
|
|
| 7 | 7 | import java.util.Collection; |
| 8 | 8 | import java.util.Collections; |
| 9 | 9 | import java.util.List; |
| | 10 | import java.util.Objects; |
| 10 | 11 | |
| 11 | 12 | import org.openstreetmap.josm.data.osm.Node; |
| 12 | 13 | import org.openstreetmap.josm.data.osm.OsmPrimitive; |
| … |
… |
public boolean evaluateCondition(Match condition) {
|
| 51 | 52 | |
| 52 | 53 | @Override |
| 53 | 54 | public int hashCode() { |
| 54 | | return 31 + ((condition == null) ? 0 : condition.hashCode()); |
| | 55 | return Objects.hash(condition); |
| 55 | 56 | } |
| 56 | 57 | |
| 57 | 58 | @Override |
| … |
… |
public boolean equals(Object obj) {
|
| 61 | 62 | if (obj == null || getClass() != obj.getClass()) |
| 62 | 63 | return false; |
| 63 | 64 | ContextProvider other = (ContextProvider) obj; |
| 64 | | if (condition == null) { |
| 65 | | if (other.condition != null) |
| 66 | | return false; |
| 67 | | } else if (!condition.equals(other.condition)) |
| 68 | | return false; |
| 69 | | return true; |
| | 65 | return Objects.equals(condition, other.condition); |
| 70 | 66 | } |
| 71 | 67 | } |
| 72 | 68 | |
| … |
… |
public boolean match(OsmPrimitive osm) {
|
| 106 | 102 | |
| 107 | 103 | @Override |
| 108 | 104 | public int hashCode() { |
| 109 | | return 31 * super.hashCode() + ((childCondition == null) ? 0 : childCondition.hashCode()); |
| | 105 | return Objects.hash(super.hashCode(), childCondition); |
| 110 | 106 | } |
| 111 | 107 | |
| 112 | 108 | @Override |
| … |
… |
public boolean equals(Object obj) {
|
| 116 | 112 | if (!super.equals(obj) || getClass() != obj.getClass()) |
| 117 | 113 | return false; |
| 118 | 114 | ParentSet other = (ParentSet) obj; |
| 119 | | if (childCondition == null) { |
| 120 | | if (other.childCondition != null) |
| 121 | | return false; |
| 122 | | } else if (!childCondition.equals(other.childCondition)) |
| 123 | | return false; |
| 124 | | return true; |
| | 115 | return Objects.equals(childCondition, other.childCondition); |
| 125 | 116 | } |
| 126 | 117 | } |
| 127 | 118 | |
| … |
… |
public boolean match(OsmPrimitive osm) {
|
| 169 | 160 | |
| 170 | 161 | @Override |
| 171 | 162 | public int hashCode() { |
| 172 | | return 31 * super.hashCode() + ((parentCondition == null) ? 0 : parentCondition.hashCode()); |
| | 163 | return Objects.hash(super.hashCode(), parentCondition); |
| 173 | 164 | } |
| 174 | 165 | |
| 175 | 166 | @Override |
| … |
… |
public boolean equals(Object obj) {
|
| 179 | 170 | if (!super.equals(obj) || getClass() != obj.getClass()) |
| 180 | 171 | return false; |
| 181 | 172 | ChildSet other = (ChildSet) obj; |
| 182 | | if (parentCondition == null) { |
| 183 | | if (other.parentCondition != null) |
| 184 | | return false; |
| 185 | | } else if (!parentCondition.equals(other.parentCondition)) |
| 186 | | return false; |
| 187 | | return true; |
| | 173 | return Objects.equals(parentCondition, other.parentCondition); |
| 188 | 174 | } |
| 189 | 175 | } |
| 190 | 176 | |
| … |
… |
public boolean match(OsmPrimitive osm) {
|
| 220 | 206 | |
| 221 | 207 | @Override |
| 222 | 208 | public int hashCode() { |
| 223 | | final int prime = 31; |
| 224 | | int result = super.hashCode(); |
| 225 | | result = prime * result + ((lhs == null) ? 0 : lhs.hashCode()); |
| 226 | | result = prime * result + ((rhs == null) ? 0 : rhs.hashCode()); |
| 227 | | return result; |
| | 209 | return Objects.hash(super.hashCode(), lhs, rhs); |
| 228 | 210 | } |
| 229 | 211 | |
| 230 | 212 | @Override |
| … |
… |
public boolean equals(Object obj) {
|
| 234 | 216 | if (!super.equals(obj) || getClass() != obj.getClass()) |
| 235 | 217 | return false; |
| 236 | 218 | OrSet other = (OrSet) obj; |
| 237 | | if (lhs == null) { |
| 238 | | if (other.lhs != null) |
| 239 | | return false; |
| 240 | | } else if (!lhs.equals(other.lhs)) |
| 241 | | return false; |
| 242 | | if (rhs == null) { |
| 243 | | if (other.rhs != null) |
| 244 | | return false; |
| 245 | | } else if (!rhs.equals(other.rhs)) |
| 246 | | return false; |
| 247 | | return true; |
| | 219 | return Objects.equals(lhs, other.lhs) && Objects.equals(rhs, other.rhs); |
| 248 | 220 | } |
| 249 | 221 | } |
| 250 | 222 | |
| … |
… |
public boolean match(OsmPrimitive osm) {
|
| 276 | 248 | |
| 277 | 249 | @Override |
| 278 | 250 | public int hashCode() { |
| 279 | | final int prime = 31; |
| 280 | | int result = super.hashCode(); |
| 281 | | result = prime * result + ((lhs == null) ? 0 : lhs.hashCode()); |
| 282 | | result = prime * result + ((rhs == null) ? 0 : rhs.hashCode()); |
| 283 | | return result; |
| | 251 | return Objects.hash(super.hashCode(), lhs, rhs); |
| 284 | 252 | } |
| 285 | 253 | |
| 286 | 254 | @Override |
| … |
… |
public boolean equals(Object obj) {
|
| 290 | 258 | if (!super.equals(obj) || getClass() != obj.getClass()) |
| 291 | 259 | return false; |
| 292 | 260 | AndSet other = (AndSet) obj; |
| 293 | | if (lhs == null) { |
| 294 | | if (other.lhs != null) |
| 295 | | return false; |
| 296 | | } else if (!lhs.equals(other.lhs)) |
| 297 | | return false; |
| 298 | | if (rhs == null) { |
| 299 | | if (other.rhs != null) |
| 300 | | return false; |
| 301 | | } else if (!rhs.equals(other.rhs)) |
| 302 | | return false; |
| 303 | | return true; |
| | 261 | return Objects.equals(lhs, other.lhs) && Objects.equals(rhs, other.rhs); |
| 304 | 262 | } |
| 305 | 263 | } |
| 306 | 264 | |
| … |
… |
public boolean isValid(TemplateEngineDataProvider dataProvider) {
|
| 409 | 367 | |
| 410 | 368 | @Override |
| 411 | 369 | public int hashCode() { |
| 412 | | final int prime = 31; |
| 413 | | int result = 1; |
| 414 | | result = prime * result + ((context == null) ? 0 : context.hashCode()); |
| 415 | | result = prime * result + ((template == null) ? 0 : template.hashCode()); |
| 416 | | return result; |
| | 370 | return Objects.hash(context, template); |
| 417 | 371 | } |
| 418 | 372 | |
| 419 | 373 | @Override |
| … |
… |
public boolean equals(Object obj) {
|
| 423 | 377 | if (obj == null || getClass() != obj.getClass()) |
| 424 | 378 | return false; |
| 425 | 379 | ContextSwitchTemplate other = (ContextSwitchTemplate) obj; |
| 426 | | if (context == null) { |
| 427 | | if (other.context != null) |
| 428 | | return false; |
| 429 | | } else if (!context.equals(other.context)) |
| 430 | | return false; |
| 431 | | if (template == null) { |
| 432 | | if (other.template != null) |
| 433 | | return false; |
| 434 | | } else if (!template.equals(other.template)) |
| 435 | | return false; |
| 436 | | return true; |
| | 380 | return Objects.equals(context, other.context) && Objects.equals(template, other.template); |
| 437 | 381 | } |
| 438 | 382 | } |