Class DefaultStringObjectMap<T extends StringObjectMap<T>>
java.lang.Object
org.springframework.data.elasticsearch.support.DefaultStringObjectMap<T>
- All Implemented Interfaces:
Map<String,,Object> StringObjectMap<T>
- Direct Known Subclasses:
EntityAsMap,Settings
public class DefaultStringObjectMap<T extends StringObjectMap<T>>
extends Object
implements StringObjectMap<T>
- Author:
- Peter-Josef Meisch
-
Nested Class Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()booleancontainsKey(Object key) booleancontainsValue(Object value) entrySet()booleanvoidforEach(BiConsumer<? super String, ? super Object> action) initializes this object from the given JSON String.getOrDefault(Object key, Object defaultValue) inthashCode()booleanisEmpty()keySet()Gets the object at the given key path (dot separated) or null if no object exists with this path.voidintsize()toJson()Render thisDocumentto JSON.toString()values()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, merge, putIfAbsent, remove, replace, replace, replaceAllMethods inherited from interface org.springframework.data.elasticsearch.support.StringObjectMap
append, get, getBoolean, getBooleanOrDefault, getBooleanOrDefault, getInt, getIntOrDefault, getIntOrDefault, getLong, getLongOrDefault, getLongOrDefault, getString, getStringOrDefault, getStringOrDefault
-
Constructor Details
-
DefaultStringObjectMap
public DefaultStringObjectMap() -
DefaultStringObjectMap
-
-
Method Details
-
toJson
Description copied from interface:StringObjectMapRender thisDocumentto JSON. Auxiliary values such as Id and version are not considered within the JSON representation.- Specified by:
toJsonin interfaceStringObjectMap<T extends StringObjectMap<T>>- Returns:
- a JSON representation of this document.
-
fromJson
Description copied from interface:StringObjectMapinitializes this object from the given JSON String.- Specified by:
fromJsonin interfaceStringObjectMap<T extends StringObjectMap<T>>- Parameters:
json- must not be null
-
size
public int size() -
isEmpty
public boolean isEmpty() -
containsKey
- Specified by:
containsKeyin interfaceMap<String,Object>
-
containsValue
- Specified by:
containsValuein interfaceMap<String,Object>
-
get
-
getOrDefault
- Specified by:
getOrDefaultin interfaceMap<String,Object>
-
put
-
remove
-
putAll
-
clear
public void clear() -
keySet
-
values
-
entrySet
-
equals
-
hashCode
public int hashCode() -
forEach
-
toString
-
path
Gets the object at the given key path (dot separated) or null if no object exists with this path.- Parameters:
path- the key path, must not be null- Returns:
- the found object or null
-