Class Edge
- java.lang.Object
-
- com.redislabs.redisgraph.graph_entities.GraphEntity
-
- com.redislabs.redisgraph.graph_entities.Edge
-
public class Edge extends GraphEntity
A class represent an edge (graph entity). In addition to the base class id and properties, an edge shows its source, destination and relationship type
-
-
Field Summary
-
Fields inherited from class com.redislabs.redisgraph.graph_entities.GraphEntity
id, propertyMap
-
-
Constructor Summary
Constructors Constructor Description Edge()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)longgetDestination()StringgetRelationshipType()longgetSource()inthashCode()voidsetDestination(long destination)voidsetRelationshipType(String relationshipType)voidsetSource(long source)StringtoString()-
Methods inherited from class com.redislabs.redisgraph.graph_entities.GraphEntity
addProperty, addProperty, getEntityPropertyNames, getId, getNumberOfProperties, getProperty, removeProperty, setId
-
-
-
-
Method Detail
-
getRelationshipType
public String getRelationshipType()
- Returns:
- the edge relationship type
-
setRelationshipType
public void setRelationshipType(String relationshipType)
- Parameters:
relationshipType- - the relationship type to be set.
-
getSource
public long getSource()
- Returns:
- The id of the source node
-
setSource
public void setSource(long source)
- Parameters:
source- - The id of the source node to be set
-
getDestination
public long getDestination()
- Returns:
- the id of the destination node
-
setDestination
public void setDestination(long destination)
- Parameters:
destination- - The id of the destination node to be set
-
equals
public boolean equals(Object o)
- Overrides:
equalsin classGraphEntity
-
hashCode
public int hashCode()
- Overrides:
hashCodein classGraphEntity
-
toString
public String toString()
- Specified by:
toStringin classGraphEntity
-
-