public class ValueWrapper extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ValueWrapper.NullType |
| Constructor and Description |
|---|
ValueWrapper(Value value,
String decodeType) |
ValueWrapper(Value value,
String decodeType,
int timezoneOffset) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
asBoolean()
Convert the original data type Value to boolean
|
DateWrapper |
asDate()
Convert the original data type Value to DateWrapper
|
DateTimeWrapper |
asDateTime()
Convert the original data type Value to DateTimeWrapper
|
double |
asDouble()
Convert the original data type Value to double
|
DurationWrapper |
asDuration()
Convert the original data type Value to duration
|
GeographyWrapper |
asGeography()
Convert the original data type Value to geography
|
ArrayList<ValueWrapper> |
asList()
Convert the original data type Value to ArrayList
|
long |
asLong()
Convert the original data type Value to long
|
HashMap<String,ValueWrapper> |
asMap()
Convert the original data type Value to HashMap
|
Node |
asNode()
Convert the original data type Value to Node
|
ValueWrapper.NullType |
asNull()
Convert the original data type Value to NullType
|
PathWrapper |
asPath()
Convert the original data type Value to Path
|
Relationship |
asRelationship()
Convert the original data type Value to Relationship
|
HashSet<ValueWrapper> |
asSet()
Convert the original data type Value to HashSet
|
String |
asString()
Convert the original data type Value to String
|
TimeWrapper |
asTime()
Convert the original data type Value to TimeWrapper
|
boolean |
equals(Object o) |
Value |
getValue()
get the original data structure, the Value is the return from nebula-graph
|
int |
hashCode() |
boolean |
isBoolean()
judge the Value is Boolean type
|
boolean |
isDate()
judge the Value is Date type, the Date type is the nebula's type
|
boolean |
isDateTime()
judge the Value is DateTime type, the DateTime type is the nebula's type
|
boolean |
isDouble()
judge the Value is Double type
|
boolean |
isDuration()
judge the Value is Duration type, the Duration type is the nebula's type
|
boolean |
isEdge()
judge the Value is Edge type, the Edge type is the nebula's type
|
boolean |
isEmpty()
judge the Value is Empty type, the Empty type is the nebula's type
|
boolean |
isGeography()
judge the Value is Geography type, the Geography type is the nebula's type
|
boolean |
isList()
judge the Value is List type, the List type is the nebula's type
|
boolean |
isLong()
judge the Value is Long type
|
boolean |
isMap()
judge the Value is Map type, the Map type is the nebula's type
|
boolean |
isNull()
judge the Value is Null type,the Null type is the nebula's type
|
boolean |
isPath()
judge the Value is Path type, the Path type is the nebula's type
|
boolean |
isSet()
judge the Value is Set type, the Set type is the nebula's type
|
boolean |
isString()
judge the Value is String type
|
boolean |
isTime()
judge the Value is Time type, the Time type is the nebula's type
|
boolean |
isVertex()
judge the Value is Vertex type, the Vertex type is the nebula's type
|
String |
toString()
Convert Value to String format
|
public ValueWrapper(Value value, String decodeType)
value - the Value get from servicedecodeType - the decodeType get from the service to decode the byte array,
but now the service no return the decodeType, so use the utf-8public ValueWrapper(Value value, String decodeType, int timezoneOffset)
value - the Value get from servicedecodeType - the decodeType get from the service to decode the byte array,
but now the service no return the decodeType, so use the utf-8timezoneOffset - the timezone offset get from the service to calculate local timepublic Value getValue()
public boolean isEmpty()
public boolean isNull()
public boolean isBoolean()
public boolean isLong()
public boolean isDouble()
public boolean isString()
public boolean isList()
public boolean isSet()
public boolean isMap()
public boolean isTime()
public boolean isDate()
public boolean isDateTime()
public boolean isVertex()
public boolean isEdge()
public boolean isPath()
public boolean isGeography()
public boolean isDuration()
public ValueWrapper.NullType asNull() throws InvalidValueException
InvalidValueException - if the value type is not nullpublic boolean asBoolean()
throws InvalidValueException
InvalidValueException - if the value type is not booleanpublic long asLong()
throws InvalidValueException
InvalidValueException - if the value type is not longpublic String asString() throws InvalidValueException, UnsupportedEncodingException
InvalidValueException - if the value type is not stringUnsupportedEncodingException - if decode bianry failedpublic double asDouble()
throws InvalidValueException
InvalidValueException - if the value type is not doublepublic ArrayList<ValueWrapper> asList() throws InvalidValueException
InvalidValueException - if the value type is not listpublic HashSet<ValueWrapper> asSet() throws InvalidValueException
InvalidValueException - if the value type is not setpublic HashMap<String,ValueWrapper> asMap() throws InvalidValueException, UnsupportedEncodingException
InvalidValueException - if the value type is not mapUnsupportedEncodingExceptionpublic TimeWrapper asTime() throws InvalidValueException
InvalidValueException - if the value type is not timepublic DateWrapper asDate() throws InvalidValueException
InvalidValueException - if the value type is not datepublic DateTimeWrapper asDateTime() throws InvalidValueException
InvalidValueException - if the value type is not datetimepublic Node asNode() throws InvalidValueException, UnsupportedEncodingException
InvalidValueException - if the value type is not vertexUnsupportedEncodingException - if decode binary failedpublic Relationship asRelationship() throws InvalidValueException
InvalidValueException - if the value type is not edgepublic PathWrapper asPath() throws InvalidValueException, UnsupportedEncodingException
InvalidValueException - if the value type is not pathUnsupportedEncodingException - if decode bianry failedpublic GeographyWrapper asGeography() throws InvalidValueException
InvalidValueException - if the value type is not geographypublic DurationWrapper asDuration() throws InvalidValueException
InvalidValueException - if the value type is not durationCopyright © 2022. All rights reserved.