Package io.deephaven.kv
Class KeyValuesCollectionMapImpl
java.lang.Object
io.deephaven.kv.KeyValuesCollectionMapImpl
- All Implemented Interfaces:
KeyValuesCollection
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.deephaven.kv.KeyValuesCollection
KeyValuesCollection.Empty -
Method Summary
Modifier and TypeMethodDescriptionReturns an immutable version ofthis.asMap()Return an unmodifiable map representing this collection.static KeyValuesCollectionwithExclusiveMap(@NotNull Map<KeyPath, KeyValue> map) The caller is giving the map to the collection, thus signifying that the collection is immutable.static KeyValuesCollectionwithSharedMap(@NotNull Map<KeyPath, KeyValue> map) The caller is retaining ownership of the map, thus signifying that the collection is not immutable, and callers must callasImmutable()if they want ownership over their own collection copy.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.deephaven.kv.KeyValuesCollection
containsKey, get, isEmpty, keys, keyValues
-
Method Details
-
withExclusiveMap
The caller is giving the map to the collection, thus signifying that the collection is immutable.- Parameters:
map- the map, which is now owned by the collection- Returns:
- the immutable key values collection
-
asImmutable
Description copied from interface:KeyValuesCollectionReturns an immutable version ofthis. May returnthisif it is immutable. Ensures that the caller can keep around their own immutable version.- Specified by:
asImmutablein interfaceKeyValuesCollection- Returns:
- an immutable version of
this
-
asMap
Description copied from interface:KeyValuesCollectionReturn an unmodifiable map representing this collection.Note: it is not necessarily the case that this map is immutable. If an immutable map is needed, use
asImmutable().asMap().- Specified by:
asMapin interfaceKeyValuesCollection- Returns:
- the unmodifiable map