aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/model/WifiAccessPoint.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/traccar/model/WifiAccessPoint.java')
-rw-r--r--src/main/java/org/traccar/model/WifiAccessPoint.java23
1 files changed, 22 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/model/WifiAccessPoint.java b/src/main/java/org/traccar/model/WifiAccessPoint.java
index 87a77f3c0..e28c1b935 100644
--- a/src/main/java/org/traccar/model/WifiAccessPoint.java
+++ b/src/main/java/org/traccar/model/WifiAccessPoint.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2016 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.
@@ -17,6 +17,8 @@ package org.traccar.model;
import com.fasterxml.jackson.annotation.JsonInclude;
+import java.util.Objects;
+
@JsonInclude(JsonInclude.Include.NON_NULL)
public class WifiAccessPoint {
@@ -63,4 +65,23 @@ public class WifiAccessPoint {
this.channel = channel;
}
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ WifiAccessPoint that = (WifiAccessPoint) o;
+ return Objects.equals(macAddress, that.macAddress)
+ && Objects.equals(signalStrength, that.signalStrength)
+ && Objects.equals(channel, that.channel);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(macAddress, signalStrength, channel);
+ }
+
}