MXUsersDevicesMap

class MXUsersDevicesMap<E>

Constructors

Link copied to clipboard
fun MXUsersDevicesMap()

Functions

Link copied to clipboard
fun addEntriesFromMap(other: MXUsersDevicesMap<E>?)

Add entries from another MXUsersDevicesMap.

Link copied to clipboard
fun getObject(userId: String?, deviceId: String?): E?

Provides the object for a device id and a user Id.

Link copied to clipboard
fun getUserDeviceIds(userId: String?): List<String>?

Provides the device ids list for a user id. FIXME Should maybe return emptyList and not null, to avoid many !! in the code

Link copied to clipboard
fun join(other: Map<out String, Map<String, E>>)
Link copied to clipboard
fun removeAllObjects()

Clear the internal dictionary.

Link copied to clipboard
fun removeUserObjects(userId: String?)

Removes objects for a dedicated user.

Link copied to clipboard
fun setObject(    userId: String?,     deviceId: String?,     o: E?)

Set an object for a dedicated user Id and device Id.

Link copied to clipboard
fun setObjects(userId: String?, objectsPerDevices: Map<String, E>?)

Defines the objects map for a user Id.

Link copied to clipboard
open override fun toString(): String

Properties

Link copied to clipboard
val isEmpty: Boolean
Link copied to clipboard
val map: HashMap<String, MutableMap<String, E>>
Link copied to clipboard
val userIds: List<String>

Extensions

Link copied to clipboard
inline fun <T> MXUsersDevicesMap<T>.forEach(action: (String, String, T) -> Unit)