Class Result
- java.lang.Object
-
- org.apache.tinkerpop.gremlin.driver.Result
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> T
get(Class<? extends T> clazz)
Gets the result item by casting it to the specifiedClass
.boolean
getBoolean()
Gets the result item by coercing it to anboolean
.byte
getByte()
Gets the result item by coercing it to anbyte
.double
getDouble()
Gets the result item by coercing it to andouble
.Edge
getEdge()
Gets the result item by casting it to anEdge
.Element
getElement()
Gets the result item by casting it to anElement
.float
getFloat()
Gets the result item by coercing it to anfloat
.int
getInt()
Gets the result item by coercing it to anint
.long
getLong()
Gets the result item by coercing it to anlong
.Object
getObject()
Gets the result item.Path
getPath()
Gets the result item by casting it to aPath
.<V> Property<V>
getProperty()
Gets the result item by casting it to aProperty
.short
getShort()
Gets the result item by coercing it to anshort
.String
getString()
Gets the result item by coercing it to aString
viatoString()
.Vertex
getVertex()
Gets the result item by casting it to aVertex
.<V> VertexProperty<V>
getVertexProperty()
Gets the result item by casting it to aVertexProperty
.boolean
isNull()
Determines if the result item is null or not.String
toString()
-
-
-
Constructor Detail
-
Result
public Result(Object responseData)
Constructs a "result" from data found inResponseResult.getData()
.
-
-
Method Detail
-
getString
public String getString()
Gets the result item by coercing it to aString
viatoString()
.
-
getInt
public int getInt()
Gets the result item by coercing it to anint
.- Throws:
NumberFormatException
- if the value is not parsable as anint
.
-
getByte
public byte getByte()
Gets the result item by coercing it to anbyte
.- Throws:
NumberFormatException
- if the value is not parsable as anbyte
.
-
getShort
public short getShort()
Gets the result item by coercing it to anshort
.- Throws:
NumberFormatException
- if the value is not parsable as anshort
.
-
getLong
public long getLong()
Gets the result item by coercing it to anlong
.- Throws:
NumberFormatException
- if the value is not parsable as anlong
.
-
getFloat
public float getFloat()
Gets the result item by coercing it to anfloat
.- Throws:
NumberFormatException
- if the value is not parsable as anfloat
.
-
getDouble
public double getDouble()
Gets the result item by coercing it to andouble
.- Throws:
NumberFormatException
- if the value is not parsable as andouble
.
-
getBoolean
public boolean getBoolean()
Gets the result item by coercing it to anboolean
.- Throws:
NumberFormatException
- if the value is not parsable as anboolean
.
-
isNull
public boolean isNull()
Determines if the result item is null or not. This is often a good check prior to calling other methods to get the object as they could throw an unexpectedNullPointerException
if the result item isnull
.
-
getVertexProperty
public <V> VertexProperty<V> getVertexProperty()
Gets the result item by casting it to aVertexProperty
.
-
get
public <T> T get(Class<? extends T> clazz)
Gets the result item by casting it to the specifiedClass
.
-
getObject
public Object getObject()
Gets the result item.
-
-