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 boolean
equals(Object o)
long
getDestination()
String
getRelationshipType()
long
getSource()
int
hashCode()
void
setDestination(long destination)
void
setRelationshipType(String relationshipType)
void
setSource(long source)
String
toString()
-
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:
equals
in classGraphEntity
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classGraphEntity
-
toString
public String toString()
- Specified by:
toString
in classGraphEntity
-
-