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/AltosBTDevice.java | |
| parent | e41786fb384892961a6547e17812a24314ce9623 (diff) | |
| parent | 271f56a41c7e785b0fab7e572325df842d104277 (diff) | |
Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
Diffstat (limited to 'altosuilib/AltosBTDevice.java')
| -rw-r--r-- | altosuilib/AltosBTDevice.java | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/altosuilib/AltosBTDevice.java b/altosuilib/AltosBTDevice.java index 0dd1cab2..d6eed64d 100644 --- a/altosuilib/AltosBTDevice.java +++ b/altosuilib/AltosBTDevice.java @@ -15,10 +15,10 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altosuilib_6; +package org.altusmetrum.altosuilib_7; import libaltosJNI.*; -import org.altusmetrum.altoslib_6.*; +import org.altusmetrum.altoslib_7.*; public class AltosBTDevice extends altos_bt_device implements AltosDevice { @@ -104,17 +104,20 @@ public class AltosBTDevice extends altos_bt_device implements AltosDevice { return false; } + public int hashCode() { + return getName().hashCode() ^ getAddr().hashCode(); + } + public boolean equals(Object o) { + if (o == null) + return false; + if (!(o instanceof AltosBTDevice)) return false; AltosBTDevice other = (AltosBTDevice) o; return getName().equals(other.getName()) && getAddr().equals(other.getAddr()); } - public int hashCode() { - return getName().hashCode() ^ getAddr().hashCode(); - } - public AltosBTDevice(String name, String addr) { AltosUILib.load_library(); libaltos.altos_bt_fill_in(name, addr,this); |
