aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/model/Network.java
diff options
context:
space:
mode:
authorcasswarry0 <casswarry0@gmail.com>2023-01-17 17:14:53 -0700
committercasswarry0 <casswarry0@gmail.com>2023-01-17 17:14:53 -0700
commit7338b8730949ed027b3f8b31d7dca20687ebbb8b (patch)
treec2d171e6121818ab511460a786f69aab97a2a628 /src/main/java/org/traccar/model/Network.java
parentcdecd3fa4427a382c0b09f8ad9d69ec14388960a (diff)
parent85501f9cf4918d5eee345f83aed7a31eecb26b8d (diff)
downloadtrackermap-server-7338b8730949ed027b3f8b31d7dca20687ebbb8b.tar.gz
trackermap-server-7338b8730949ed027b3f8b31d7dca20687ebbb8b.tar.bz2
trackermap-server-7338b8730949ed027b3f8b31d7dca20687ebbb8b.zip
Merge branch 'master' into develop
Diffstat (limited to 'src/main/java/org/traccar/model/Network.java')
-rw-r--r--src/main/java/org/traccar/model/Network.java26
1 files changed, 25 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/model/Network.java b/src/main/java/org/traccar/model/Network.java
index 4d67fc5d8..b31c53c38 100644
--- a/src/main/java/org/traccar/model/Network.java
+++ b/src/main/java/org/traccar/model/Network.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2016 - 2019 Anton Tananaev (anton@traccar.org)
+ * Copyright 2016 - 2022 Anton Tananaev (anton@traccar.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -19,6 +19,7 @@ import com.fasterxml.jackson.annotation.JsonInclude;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.Objects;
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Network {
@@ -118,4 +119,27 @@ public class Network {
wifiAccessPoints.add(wifiAccessPoint);
}
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ Network network = (Network) o;
+ return Objects.equals(homeMobileCountryCode, network.homeMobileCountryCode)
+ && Objects.equals(homeMobileNetworkCode, network.homeMobileNetworkCode)
+ && Objects.equals(radioType, network.radioType)
+ && Objects.equals(carrier, network.carrier)
+ && Objects.equals(cellTowers, network.cellTowers)
+ && Objects.equals(wifiAccessPoints, network.wifiAccessPoints);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(
+ homeMobileCountryCode, homeMobileNetworkCode, radioType, carrier, cellTowers, wifiAccessPoints);
+ }
+
}