Class Node
- java.lang.Object
-
- com.redislabs.redisgraph.graph_entities.GraphEntity
-
- com.redislabs.redisgraph.graph_entities.Node
-
public class Node extends GraphEntity
* A class represent an node (graph entity). In addition to the base class id and properties, a node has labels.
-
-
Field Summary
-
Fields inherited from class com.redislabs.redisgraph.graph_entities.GraphEntity
id, propertyMap
-
-
Constructor Summary
Constructors Constructor Description Node()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddLabel(String label)booleanequals(Object o)StringgetLabel(int index)intgetNumberOfLabels()inthashCode()voidremoveLabel(String label)StringtoString()-
Methods inherited from class com.redislabs.redisgraph.graph_entities.GraphEntity
addProperty, addProperty, getEntityPropertyNames, getId, getNumberOfProperties, getProperty, removeProperty, setId
-
-
-
-
Method Detail
-
addLabel
public void addLabel(String label)
- Parameters:
label- - a label to be add
-
removeLabel
public void removeLabel(String label)
- Parameters:
label- - a label to be removed
-
getLabel
public String getLabel(int index)
- 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
public boolean equals(Object o)
- Overrides:
equalsin classGraphEntity
-
hashCode
public int hashCode()
- Overrides:
hashCodein classGraphEntity
-
toString
public String toString()
- Specified by:
toStringin classGraphEntity
-
-