Class Node
java.lang.Object
redis.clients.jedis.graph.entities.GraphEntity
redis.clients.jedis.graph.entities.Node
* A class represent an node (graph entity). In addition to the base class id and properties, a node has labels.
-
Field Summary
FieldsFields inherited from class redis.clients.jedis.graph.entities.GraphEntity
id, propertyMap -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class redis.clients.jedis.graph.entities.GraphEntity
addProperty, addProperty, getEntityPropertyNames, getId, getNumberOfProperties, getProperty, removeProperty, setId
-
Field Details
-
labels
-
-
Constructor Details
-
Node
public Node() -
Node
public Node(int labelsCapacity, int propertiesCapacity) Use this constructor to reduce memory allocations when labels or properties are added to the node- Parameters:
labelsCapacity- preallocate the capacity for the node labelspropertiesCapacity- preallocate the capacity for the properties
-
-
Method Details
-
addLabel
- Parameters:
label- - a label to be add
-
removeLabel
- Parameters:
label- - a label to be removed
-
getLabel
- Parameters:
index- - label index- Returns:
- the property label
- Throws:
IndexOutOfBoundsException- if the index is out of range (index < 0 || index >= getNumberOfLabels())
-
getNumberOfLabels
public int getNumberOfLabels()- Returns:
- the number of labels
-
equals
- Overrides:
equalsin classGraphEntity
-
hashCode
public int hashCode()- Overrides:
hashCodein classGraphEntity
-
toString
- Specified by:
toStringin classGraphEntity
-