| Type | Property and Description |
|---|---|
Property |
as
Returns this node as a
Property. |
VertexProperty |
asVertex
Returns this node as a
VertexProperty. |
| Constructor and Description |
|---|
ObjectGraphNode(Object delegate) |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
as(Class<T> clazz)
Deserializes and returns this node as an instance of
clazz. |
<T> T |
as(TypeToken<T> type)
Deserializes and returns this node as an instance of the given
type. |
boolean |
asBoolean()
Returns this node as a boolean.
|
double |
asDouble()
Returns this node as a double.
|
Edge |
asEdge()
Returns this node as an
Edge. |
int |
asInt()
Returns this node as an integer.
|
long |
asLong()
Returns this node as a long integer.
|
Map<String,Object> |
asMap()
Deserializes and returns this node as an instance of
Map<String, Object>. |
Path |
asPath()
Returns this node as a
Path. |
Property |
asProperty()
Returns this node as a
Property. |
String |
asString()
Returns a valid String representation of this node,
if the node is a simple node (i.e.
|
Vertex |
asVertex()
Returns this node as a
Vertex. |
VertexProperty |
asVertexProperty()
Returns this node as a
VertexProperty. |
boolean |
equals(Object other) |
Iterator<String> |
fieldNames()
Returns all the field names of the current node, if it is an object,
or an empty iterator otherwise.
|
GraphNode |
get(int index)
Returns the element node at the specified
index of an array node. |
GraphNode |
get(String fieldName)
Returns the value of the specified field of an object node.
|
int |
hashCode() |
boolean |
isArray()
Returns whether this node is an array.
|
boolean |
isEdge()
Returns
true if this node is an edge. |
boolean |
isNull()
Returns whether this node is
null. |
boolean |
isObject()
Returns whether this node is an object.
|
boolean |
isValue()
Returns whether this node is a simple value,
i.e.
|
boolean |
isVertex()
Returns
true if this node is a vertex. |
int |
size()
Returns the size of the current node,
if it is an array, or
0 otherwise. |
String |
toString() |
public Property asProperty
asProperty in interface GraphNodepublic VertexProperty asVertexProperty
asVertexProperty in interface GraphNodepublic ObjectGraphNode(Object delegate)
public boolean isNull()
Nodenull.public boolean isObject()
Node
Only one method out of Node.isObject(), Node.isArray() and
Node.isValue() should ever return true for one given node.
public boolean isArray()
Node
Only one method out of Node.isObject(), Node.isArray() and
Node.isValue() should ever return true for one given node.
public boolean isValue()
Nodenull.
Only one method out of Node.isObject(), Node.isArray() and
Node.isValue() should ever return true for one given node.
public Iterator<String> fieldNames()
NodefieldNames in interface NodeIterator of all the field names of the current node.public int size()
Node0 otherwise.public int asInt()
Node
If this node can not be converted to an int
(including structured types like Objects and Arrays),
0 will be returned; no exceptions will be thrown.
public boolean asBoolean()
Node
If this node can not be converted to a boolean
(including structured types like Objects and Arrays),
false will be returned; no exceptions will be thrown.
public long asLong()
Nodepublic double asDouble()
Nodepublic String asString()
Nodepublic Map<String,Object> asMap()
NodeMap<String, Object>.public <T> T as(Class<T> clazz)
Nodeclazz.
Before attempting such a conversion, there must be an appropriate converter configured on the underlying serialization runtime.
public <T> T as(TypeToken<T> type)
Nodetype.
Before attempting such a conversion, there must be an appropriate converter configured on the underlying serialization runtime.
public GraphNode get(String fieldName)
Node
If this node is not an object (or it does not have a value
for the specified field name), or if there is no field with
such name, null is returned.
If the property value has been explicitly set to null,
implementors may return a special "null node" instead of null.
public GraphNode get(int index)
Nodeindex of an array node.
For all other node types, null is returned.
If index is out of bounds, (i.e. less than zero or >= size(),
null is returned; no exception will be thrown.
If the requested element has been explicitly set to null,
implementors may return a special "null node" instead of null.
public boolean isVertex()
GraphNodetrue if this node is a vertex.
If this node is a vertex, then GraphNode.asVertex() can be safely called.public boolean isEdge()
GraphNodetrue if this node is an edge.
If this node is an edge, then GraphNode.asEdge() can be safely called.public Vertex asVertex()
GraphNodeVertex.public Edge asEdge()
GraphNodeEdge.public Path asPath()
GraphNodePath.public Property asProperty()
GraphNodeProperty.asProperty in interface GraphNodepublic VertexProperty asVertexProperty()
GraphNodeVertexProperty.asVertexProperty in interface GraphNodeCopyright © 2012–2017. All rights reserved.