Class Result
- java.lang.Object
-
- org.apache.tinkerpop.gremlin.driver.Result
-
-
Constructor Summary
Constructors Constructor Description Result(Object responseData)Constructs a "result" from data found inResponseResult.getData().
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> Tget(Class<? extends T> clazz)Gets the result item by casting it to the specifiedClass.booleangetBoolean()Gets the result item by coercing it to anboolean.bytegetByte()Gets the result item by coercing it to anbyte.doublegetDouble()Gets the result item by coercing it to andouble.EdgegetEdge()Gets the result item by casting it to anEdge.ElementgetElement()Gets the result item by casting it to anElement.floatgetFloat()Gets the result item by coercing it to anfloat.intgetInt()Gets the result item by coercing it to anint.longgetLong()Gets the result item by coercing it to anlong.ObjectgetObject()Gets the result item.PathgetPath()Gets the result item by casting it to aPath.<V> Property<V>getProperty()Gets the result item by casting it to aProperty.shortgetShort()Gets the result item by coercing it to anshort.StringgetString()Gets the result item by coercing it to aStringviatoString().VertexgetVertex()Gets the result item by casting it to aVertex.<V> VertexProperty<V>getVertexProperty()Gets the result item by casting it to aVertexProperty.booleanisNull()Determines if the result item is null or not.StringtoString()
-
-
-
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 aStringviatoString().
-
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 unexpectedNullPointerExceptionif 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.
-
-