diff options
author | Bdale Garbee <bdale@gag.com> | 2015-07-15 16:43:50 -0600 |
---|---|---|
committer | Bdale Garbee <bdale@gag.com> | 2015-07-15 16:43:50 -0600 |
commit | 643c2fb03833d658320f476ef731bbb06fe3cc31 (patch) | |
tree | 878c9df5dbd9bab9169becea4e06e8bae3529541 /altosuilib/AltosScanUI.java | |
parent | e41786fb384892961a6547e17812a24314ce9623 (diff) | |
parent | 271f56a41c7e785b0fab7e572325df842d104277 (diff) |
Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
Diffstat (limited to 'altosuilib/AltosScanUI.java')
-rw-r--r-- | altosuilib/AltosScanUI.java | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/altosuilib/AltosScanUI.java b/altosuilib/AltosScanUI.java index 5a7e21b1..fccfbaee 100644 --- a/altosuilib/AltosScanUI.java +++ b/altosuilib/AltosScanUI.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_6; +package org.altusmetrum.altosuilib_7; import java.awt.*; import java.awt.event.*; @@ -25,7 +25,7 @@ import java.io.*; import java.util.*; import java.text.*; import java.util.concurrent.*; -import org.altusmetrum.altoslib_6.*; +import org.altusmetrum.altoslib_7.*; class AltosScanResult { String callsign; @@ -62,9 +62,18 @@ class AltosScanResult { rate = in_rate; } - public boolean equals(AltosScanResult other) { + public int hashCode() { + return serial ^ frequency.hashCode() ^ telemetry ^ rate; + } + + public boolean equals(Object o) { + if (o == null) + return false; + if (!(o instanceof AltosScanResult)) + return false; + AltosScanResult other = (AltosScanResult) o; return (serial == other.serial && - frequency.frequency == other.frequency.frequency && + frequency.equals(other.frequency) && telemetry == other.telemetry && rate == other.rate); } |