Class EntityValueAdapter<V extends Entity>
java.lang.Object
org.neo4j.driver.internal.types.InternalMapAccessorWithDefaultValue
org.neo4j.driver.internal.value.ValueAdapter
org.neo4j.driver.internal.value.ObjectValueAdapter<V>
org.neo4j.driver.internal.value.EntityValueAdapter<V>
- All Implemented Interfaces:
org.neo4j.bolt.connection.values.Value, InternalValue, MapAccessor, MapAccessorWithDefaultValue, Value
- Direct Known Subclasses:
NodeValue, RelationshipValue
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasEntity()Returns the value as aEntity, if possible.asMap()Return the underlying map as a map of string keys and values converted usingValue.asObject().Return the underlying map as a map of string keys and values converted using the supplied function.Retrieve the value of the property with the given keykeys()Retrieve the keys of the underlying mapintsize()Retrieve the number of entries in this mapMethods inherited from class ObjectValueAdapter
asObject, equals, hashCode, toStringMethods inherited from class ValueAdapter
asBoltVector, asBoolean, asBoolean, asByteArray, asByteArray, asDouble, asDouble, asFloat, asFloat, asInt, asInt, asIsoDuration, asIsoDuration, asList, asList, asList, asList, asLocalDate, asLocalDate, asLocalDateTime, asLocalDateTime, asLocalTime, asLocalTime, asLong, asLong, asMap, asMap, asMapped, asNode, asNumber, asOffsetDateTime, asOffsetDateTime, asOffsetTime, asOffsetTime, asPath, asPoint, asPoint, asRelationship, asString, asString, asUnsupportedType, asUUID, asValue, asVector, asZonedDateTime, asZonedDateTime, computeOrDefault, containsKey, get, hasType, isEmpty, isFalse, isNull, isTrue, typeConstructor, values, valuesMethods inherited from class InternalMapAccessorWithDefaultValue
get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, getMethods inherited from interface InternalValue
as, as, asBoltIsoDuration, asBoltMap, asBoltPoint, boltValues, getBoltValueMethods inherited from interface MapAccessorWithDefaultValue
get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, getMethods inherited from interface org.neo4j.bolt.connection.values.Value
boltValueType
-
Constructor Details
-
EntityValueAdapter
-
-
Method Details
-
asEntity
-
asMap
Description copied from interface:MapAccessorReturn the underlying map as a map of string keys and values converted usingValue.asObject().This is equivalent to calling
MapAccessor.asMap(Function)withValues.ofObject().- Specified by:
asMapin interfaceMapAccessor- Overrides:
asMapin classValueAdapter- Returns:
- the value as a Java map
-
asMap
Description copied from interface:MapAccessorReturn the underlying map as a map of string keys and values converted using the supplied function.- Specified by:
asMapin interfaceMapAccessor- Overrides:
asMapin classValueAdapter- Type Parameters:
T- the type of map values- Parameters:
mapFunction- a function to map from Value to T. SeeValuesfor some predefined functions, such asValues.ofBoolean(),Values.ofList(Function).- Returns:
- the value as a map from string keys to values of type T obtained from mapping the original map values, if possible
- See Also:
-
size
public int size()Description copied from interface:MapAccessorRetrieve the number of entries in this map- Specified by:
sizein interfaceMapAccessor- Specified by:
sizein interfaceValue- Overrides:
sizein classValueAdapter- Returns:
- the number of entries in this map
-
keys
Description copied from interface:MapAccessorRetrieve the keys of the underlying map- Specified by:
keysin interfaceMapAccessor- Specified by:
keysin interfaceValue- Overrides:
keysin classValueAdapter- Returns:
- all map keys in unspecified order
-
get
Description copied from interface:MapAccessorRetrieve the value of the property with the given key- Specified by:
getin interfaceMapAccessor- Overrides:
getin classValueAdapter- Parameters:
key- the key of the property- Returns:
- the property's value or a
NullValueif no such key exists
-