Package moe.kyokobot.libdave
Class RosterMap
java.lang.Object
moe.kyokobot.libdave.RosterMap
A read-only map representing the roster of participants in a DAVE session and their associated key data.
This maps user IDs (Long) to their key material (byte[]).
In the context of CommitResult, this map represents changes: an entry with a value indicates an add/update,
while an entry might represent removal depending on context (though typically removals might be explicit or implied by absence in a full snapshot,
but specifically for commit results, it lists changed IDs).
Note: The implementation is backed by native arrays and is immutable.
-
Nested Class Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()booleancontainsKey(Object key) booleancontainsValue(Object value) entrySet()byte[]get(long key) byte[]booleanisEmpty()keySet()byte[]voidbyte[]intsize()@NotNull Collection<byte[]>values()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
RosterMap
public RosterMap(long[] keys, byte[][] values)
-
-
Method Details
-
size
public int size() -
isEmpty
public boolean isEmpty() -
containsKey
- Specified by:
containsKeyin interfaceMap<Long,byte[]>
-
containsValue
- Specified by:
containsValuein interfaceMap<Long,byte[]>
-
get
-
get
public byte[] get(long key) -
put
-
remove
-
putAll
-
clear
public void clear() -
keySet
-
values
-
entrySet
-