public class Node extends GraphEntity
id, propertyMap
Constructor and Description |
---|
Node() |
Node(int labelsCapacity,
int propertiesCapacity)
Use this constructor to reduce memory allocations
when labels or properties are added to the node
|
Modifier and Type | Method and Description |
---|---|
void |
addLabel(java.lang.String label) |
boolean |
equals(java.lang.Object o) |
java.lang.String |
getLabel(int index) |
int |
getNumberOfLabels() |
int |
hashCode() |
void |
removeLabel(java.lang.String label) |
java.lang.String |
toString() |
addProperty, addProperty, getEntityPropertyNames, getId, getNumberOfProperties, getProperty, removeProperty, setId
public Node()
public Node(int labelsCapacity, int propertiesCapacity)
labelsCapacity
- preallocate the capacity for the node labelspropertiesCapacity
- preallocate the capacity for the propertiespublic void addLabel(java.lang.String label)
label
- - a label to be addpublic void removeLabel(java.lang.String label)
label
- - a label to be removedpublic java.lang.String getLabel(int index)
index
- - label indexjava.lang.IndexOutOfBoundsException
- if the index is out of range
(index < 0 || index >= getNumberOfLabels()
)public int getNumberOfLabels()
public boolean equals(java.lang.Object o)
equals
in class GraphEntity
public int hashCode()
hashCode
in class GraphEntity
public java.lang.String toString()
toString
in class GraphEntity
Copyright © 2023. All rights reserved.