java.lang.Object
org.neo4j.driver.internal.types.InternalMapAccessorWithDefaultValue
org.neo4j.driver.internal.value.ValueAdapter
org.neo4j.driver.internal.value.StringValue
- All Implemented Interfaces:
org.neo4j.driver.internal.AsValue,InternalValue,MapAccessor,MapAccessorWithDefaultValue,Value
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasObject()This returns a java standard library representation of the underlying value, using a java type that is "sensible" given the underlying type.asString()booleaninthashCode()booleanisEmpty()If this value represents a list or map, test if the collection is empty.intsize()If the underlying value is a collection type, return the number of values in the collection.toString()type()Methods inherited from class org.neo4j.driver.internal.value.ValueAdapter
asBoolean, asBoolean, asByteArray, asByteArray, asDouble, asDouble, asEntity, asFloat, asFloat, asInt, asInt, asIsoDuration, asIsoDuration, asList, asList, asList, asList, asLocalDate, asLocalDate, asLocalDateTime, asLocalDateTime, asLocalTime, asLocalTime, asLong, asLong, asMap, asMap, asMap, asMap, asNode, asNumber, asOffsetDateTime, asOffsetDateTime, asOffsetTime, asOffsetTime, asPath, asPoint, asPoint, asRelationship, asString, asValue, asZonedDateTime, asZonedDateTime, computeOrDefault, containsKey, get, get, hasType, isFalse, isNull, isTrue, keys, typeConstructor, values, valuesMethods inherited from class org.neo4j.driver.internal.types.InternalMapAccessorWithDefaultValue
get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get, get
-
Constructor Details
-
StringValue
-
-
Method Details
-
isEmpty
public boolean isEmpty()Description copied from interface:ValueIf this value represents a list or map, test if the collection is empty.- Specified by:
isEmptyin interfaceValue- Overrides:
isEmptyin classValueAdapter- Returns:
trueif size() is 0, otherwisefalse
-
size
public int size()Description copied from interface:ValueIf the underlying value is a collection type, return the number of values in the collection.For
TypeSystem.LIST()list} values, this will return the size of the list.For
mapvalues, this will return the number of entries in the map.For
nodeandTypeSystem.RELATIONSHIP()relationship} values, this will return the number of properties.For
pathvalues, this returns the length (number of relationships) in the path.- Specified by:
sizein interfaceMapAccessor- Specified by:
sizein interfaceValue- Overrides:
sizein classValueAdapter- Returns:
- the number of values in an underlying collection
-
asObject
Description copied from interface:ValueThis returns a java standard library representation of the underlying value, using a java type that is "sensible" given the underlying type. The mapping for common types is as follows:TypeSystem.NULL()-nullTypeSystem.LIST()-ListTypeSystem.MAP()-MapTypeSystem.BOOLEAN()-BooleanTypeSystem.INTEGER()-LongTypeSystem.FLOAT()-DoubleTypeSystem.STRING()-StringTypeSystem.BYTES()- byte[]TypeSystem.DATE()-LocalDateTypeSystem.TIME()-OffsetTimeTypeSystem.LOCAL_TIME()-LocalTimeTypeSystem.DATE_TIME()-ZonedDateTimeTypeSystem.LOCAL_DATE_TIME()-LocalDateTimeTypeSystem.DURATION()-IsoDurationTypeSystem.POINT()-PointTypeSystem.NODE()-NodeTypeSystem.RELATIONSHIP()-RelationshipTypeSystem.PATH()-Path
TypeSystemrefers to the Neo4j type system whereTypeSystem.INTEGER()andTypeSystem.FLOAT()are both 64-bit precision. This is why these types return javaLongandDouble, respectively.- Specified by:
asObjectin interfaceValue- Overrides:
asObjectin classValueAdapter- Returns:
- the value as a Java Object.
-
asString
- Specified by:
asStringin interfaceValue- Overrides:
asStringin classValueAdapter- Returns:
- the value as a Java String, if possible.
-
toString
- Specified by:
toStringin interfaceValue- Specified by:
toStringin classValueAdapter
-
type
- Returns:
- The type of this value as defined in the Neo4j type system
-
equals
- Specified by:
equalsin interfaceValue- Specified by:
equalsin classValueAdapter
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceValue- Specified by:
hashCodein classValueAdapter
-