public class BasicMapId extends Object implements MapId
MapId.
Note: This could be extended in various cool ways, like one that takes a type and validates that the given
name corresponds to an actual field or bean property on that type. There could also be another one that uses a
CassandraPersistentEntity and CassandraPersistentProperty instead of a String name.| Constructor and Description |
|---|
BasicMapId()
Create a new and empty
BasicMapId. |
BasicMapId(Map<String,Object> map)
Create a new
BasicMapId given a Map of key-value tuples. |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
boolean |
containsKey(Object name) |
boolean |
containsValue(Object value) |
Set<Map.Entry<String,Object>> |
entrySet() |
boolean |
equals(Object that) |
Object |
get(Object name) |
int |
hashCode() |
static MapId |
id()
Factory method.
|
static MapId |
id(MapId id)
Factory method.
|
static MapId |
id(String name,
Object value)
Factory method.
|
boolean |
isEmpty() |
Set<String> |
keySet() |
Object |
put(String name,
Object value) |
void |
putAll(Map<? extends String,? extends Object> source) |
Object |
remove(Object name) |
int |
size() |
String |
toString() |
Collection<Object> |
values() |
BasicMapId |
with(String name,
Object value)
Builder method that adds the value for the named property, then returns
this. |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAllpublic BasicMapId()
BasicMapId.public BasicMapId(Map<String,Object> map)
BasicMapId given a Map of key-value tuples.map - must not be null.public static MapId id()
BasicMapIdpublic static MapId id(String name, Object value)
BasicMapIdpublic static MapId id(MapId id)
BasicMapIdpublic BasicMapId with(String name, @Nullable Object value)
MapIdthis.public boolean containsKey(Object name)
containsKey in interface Map<String,Object>public boolean containsValue(Object value)
containsValue in interface Map<String,Object>public boolean equals(Object that)
public int hashCode()
Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.