Class Edge
java.lang.Object
redis.clients.jedis.graph.entities.GraphEntity
redis.clients.jedis.graph.entities.Edge
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
FieldsFields inherited from class redis.clients.jedis.graph.entities.GraphEntity
id, propertyMap -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanlonglonginthashCode()voidsetDestination(long destination) voidsetRelationshipType(String relationshipType) voidsetSource(long source) toString()Methods inherited from class redis.clients.jedis.graph.entities.GraphEntity
addProperty, addProperty, getEntityPropertyNames, getId, getNumberOfProperties, getProperty, removeProperty, setId
-
Field Details
-
relationshipType
-
source
private long source -
destination
private long destination
-
-
Constructor Details
-
Edge
public Edge() -
Edge
public Edge(int propertiesCapacity) Use this constructor to reduce memory allocations when properties are added to the edge- Parameters:
propertiesCapacity- preallocate the capacity for the properties
-
-
Method Details
-
getRelationshipType
- Returns:
- the edge relationship type
-
setRelationshipType
- 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
- Overrides:
equalsin classGraphEntity
-
hashCode
public int hashCode()- Overrides:
hashCodein classGraphEntity
-
toString
- Specified by:
toStringin classGraphEntity
-