public class CachedDeviceList extends Object implements Serializable
The client ensures, that his own device id is on the list of active devices, as soon as he gets online.
| Constructor and Description |
|---|
CachedDeviceList() |
| Modifier and Type | Method and Description |
|---|---|
void |
addDevice(int deviceId)
Add a device to the list of active devices.
|
boolean |
contains(int deviceId)
Returns true if deviceId is either in the list of active or inactive devices.
|
Set<Integer> |
getActiveDevices()
Returns all active devices.
|
Set<Integer> |
getAllDevices()
Returns an OmemoDeviceListElement containing all devices (active and inactive).
|
Set<Integer> |
getInactiveDevices()
Return all inactive devices.
|
void |
merge(Set<Integer> deviceListUpdate)
Merge a device list update into the CachedDeviceList.
|
String |
toString() |
public CachedDeviceList()
public Set<Integer> getActiveDevices()
public Set<Integer> getInactiveDevices()
public Set<Integer> getAllDevices()
public void merge(Set<Integer> deviceListUpdate)
deviceListUpdate - received device list updatepublic void addDevice(int deviceId)
deviceId - deviceId that will be addedpublic boolean contains(int deviceId)
deviceId - id