com.qualcomm.robotcore.hardware

## Class ScannedDevices

- java.lang.Object
- - com.qualcomm.robotcore.hardware.ScannedDevices

-     public class ScannedDevices
      extends java.lang.Object

  `ScannedDevices` is a simple distinguished kind of map of serial numbers to device types. Simple serialization and deserialization logic is provided.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `protected static class` | `ScannedDevices.MapAdapter` There *has* to be an easier way here, somehow.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected java.lang.String` | `errorMessage`
    `protected java.lang.Object` | `lock`
    `protected java.util.Map<SerialNumber,DeviceManager.UsbDeviceType>` | `map`
    `static java.lang.String` | `TAG`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ScannedDevices()`
    `ScannedDevices(ScannedDevices them)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `containsKey(SerialNumber serialNumber)`
    `java.util.Set<java.util.Map.Entry<SerialNumber,DeviceManager.UsbDeviceType>>` | `entrySet()`
    `static ScannedDevices` | `fromSerializationString(java.lang.String string)`
    `DeviceManager.UsbDeviceType` | `get(SerialNumber serialNumber)`
    `java.lang.String` | `getErrorMessage()`
    `java.util.Set<SerialNumber>` | `keySet()`
    `protected static Gson` | `newGson()`
    `DeviceManager.UsbDeviceType` | `put(SerialNumber serialNumber, DeviceManager.UsbDeviceType deviceType)`
    `DeviceManager.UsbDeviceType` | `remove(SerialNumber serialNumber)`
    `void` | `setErrorMessage(java.lang.String errorMessage)`
    `int` | `size()`
    `java.lang.String` | `toSerializationString()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### TAG

          public static final java.lang.String TAG

      See Also:
        Constant Field Values

    - #### lock

          protected final java.lang.Object lock

    - #### errorMessage

          protected java.lang.String errorMessage

    - #### map

          protected java.util.Map<SerialNumber,DeviceManager.UsbDeviceType> map

  - ### Constructor Detail

    - #### ScannedDevices

          public ScannedDevices(ScannedDevices them)

    - #### ScannedDevices

          public ScannedDevices()

  - ### Method Detail

    - #### setErrorMessage

          public void setErrorMessage(java.lang.String errorMessage)

    - #### getErrorMessage

          public java.lang.String getErrorMessage()

    - #### size

          public int size()

    - #### put

          public DeviceManager.UsbDeviceType put(SerialNumber serialNumber,
                                                 DeviceManager.UsbDeviceType deviceType)

    - #### get

          public DeviceManager.UsbDeviceType get(SerialNumber serialNumber)

    - #### containsKey

          public boolean containsKey(SerialNumber serialNumber)

    - #### keySet

          public java.util.Set<SerialNumber> keySet()

    - #### entrySet

          public java.util.Set<java.util.Map.Entry<SerialNumber,DeviceManager.UsbDeviceType>> entrySet()

    - #### remove

          public DeviceManager.UsbDeviceType remove(SerialNumber serialNumber)

    - #### newGson

          protected static Gson newGson()

    - #### toSerializationString

          public java.lang.String toSerializationString()

    - #### fromSerializationString

          public static ScannedDevices fromSerializationString(java.lang.String string)