public class CachedDeviceList extends java.lang.Object implements java.io.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.
|
java.util.Set<java.lang.Integer> |
getActiveDevices()
Returns all active devices.
|
java.util.Set<java.lang.Integer> |
getAllDevices()
Returns an OmemoDeviceListElement containing all devices (active and inactive).
|
java.util.Set<java.lang.Integer> |
getInactiveDevices()
Return all inactive devices.
|
void |
merge(java.util.Set<java.lang.Integer> deviceListUpdate)
Merge a device list update into the CachedDeviceList.
|
java.lang.String |
toString() |
public CachedDeviceList()
public java.util.Set<java.lang.Integer> getActiveDevices()
public java.util.Set<java.lang.Integer> getInactiveDevices()
public java.util.Set<java.lang.Integer> getAllDevices()
public void merge(java.util.Set<java.lang.Integer> deviceListUpdate)
deviceListUpdate - received device list updatepublic void addDevice(int deviceId)
deviceId - deviceId that will be addedpublic boolean contains(int deviceId)
deviceId - idpublic java.lang.String toString()
toString in class java.lang.Object