Class CouchbaseMap<E>
- Type Parameters:
E- the type of values in the map (restricted toJsonObject.
A CouchbaseMap is a
Map backed by a Couchbase document (more specifically a
JSON object).
Null keys are NOT permitted, and keys are restricted to String.
Values in a CouchbaseMap are restricted to the types that a JSON objects
can contain. JSON sub-objects and sub-arrays can be represented as JsonObject and JsonArray
respectively.- Since:
- 2.3.6
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> -
Constructor Summary
ConstructorsConstructorDescriptionCouchbaseMap(String id, Collection collection, Class<E> entityType, MapOptions options) -
Method Summary
Methods inherited from class java.util.AbstractMap
clone, equals, hashCode, isEmpty, keySet, putAll, toString, valuesMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
CouchbaseMap
Create a newCouchbaseMap, backed by the document identified byidin the given Couchbasebucket. Note that if the document already exists, its content will be used as initial content for this collection. Otherwise it is created empty.- Parameters:
id- the id of the Couchbase document to back the map.collection- theCollectionthrough which to interact with the document.entityType- aClassdescribing the type of objects used as values in this Map.options- aMapOptionsto use for all operations on this instance of the map.
-
-
Method Details
-
put
-
get
-
remove
-
clear
public void clear() -
entrySet
-
containsKey
- Specified by:
containsKeyin interfaceMap<String,E> - Overrides:
containsKeyin classAbstractMap<String,E>
-
containsValue
- Specified by:
containsValuein interfaceMap<String,E> - Overrides:
containsValuein classAbstractMap<String,E>
-
size
public int size()
-