Results 1 to 2 of 2
  1. #1
    kjkrum's Avatar
    kjkrum is offline Senior Member
    Join Date
    Apr 2011
    Location
    Tucson, AZ
    Posts
    1,060
    Rep Power
    6

    Default Equality of BluetoothDevices

    I want to use android.bluetooth.BluetoothDevices as keys in a Map, but it's not clear from the documentation whether their equals and hashCode methods are up to the task. Can anyone shed any light on this? If it isn't documented to work, I'll probably use their addresses as keys instead.
    Get in the habit of using standard Java naming conventions!

  2. #2
    kjkrum's Avatar
    kjkrum is offline Senior Member
    Join Date
    Apr 2011
    Location
    Tucson, AZ
    Posts
    1,060
    Rep Power
    6

    Default Re: Equality of BluetoothDevices

    I ended up using a Map<String, BluetoothSocket>. The keys are formed by concatenating the socket address with the SDP UUID.
    Get in the habit of using standard Java naming conventions!

Similar Threads

  1. Programming Question - Equality
    By Huntersgirl12 in forum New To Java
    Replies: 7
    Last Post: 01-19-2012, 04:05 PM
  2. Using Booleans for equality?
    By Maniacmike3128 in forum New To Java
    Replies: 1
    Last Post: 04-08-2011, 08:41 PM
  3. compare the remaining of Strings for equality
    By Cylab in forum New To Java
    Replies: 5
    Last Post: 08-19-2010, 02:42 PM
  4. compare the remaining of Strings for equality
    By Cylab in forum Advanced Java
    Replies: 6
    Last Post: 08-19-2010, 02:40 PM
  5. JSTL -- Comparing two strings for equality
    By trinkets in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 02-12-2008, 04:39 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •