Package dev.roanh.gmark.lang.cpq
Class QueryGraphCPQ.Edge
java.lang.Object
dev.roanh.gmark.lang.cpq.QueryGraphCPQ.QueryGraphComponent
dev.roanh.gmark.lang.cpq.QueryGraphCPQ.Edge
- All Implemented Interfaces:
IDable
,Comparable<QueryGraphCPQ.QueryGraphComponent>
- Enclosing class:
- QueryGraphCPQ
Represents a directed edge in a CPQ query graph.
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Predicate
The edge label.private final QueryGraphCPQ.Vertex
The edge source vertex.private final QueryGraphCPQ.Vertex
The edge target vertex.Fields inherited from class dev.roanh.gmark.lang.cpq.QueryGraphCPQ.QueryGraphComponent
id
-
Constructor Summary
ModifierConstructorDescriptionprivate
Edge
(QueryGraphCPQ.Vertex src, QueryGraphCPQ.Vertex trg, Predicate label) Constructs a new edge with the given source and target vertex and edge label. -
Method Summary
Modifier and TypeMethodDescriptionboolean
getLabel()
Gets the label of this edge.Gets the source vertex of this edge.Gets the target vertex of this edge.int
hashCode()
boolean
isEdge()
Checks if this query graph component is an edge.boolean
isVertex()
Checks if this query graph component is a vertex.toString()
Methods inherited from class dev.roanh.gmark.lang.cpq.QueryGraphCPQ.QueryGraphComponent
compareTo, getID
-
Field Details
-
src
The edge source vertex. -
trg
The edge target vertex. -
label
The edge label.
-
-
Constructor Details
-
Edge
Constructs a new edge with the given source and target vertex and edge label.- Parameters:
src
- The edge source vertex.trg
- The edge target vertex.label
- The edge label.
-
-
Method Details
-
getSource
Gets the source vertex of this edge.- Returns:
- The source vertex of this edge.
-
getTarget
Gets the target vertex of this edge.- Returns:
- The target vertex of this edge.
-
getLabel
Gets the label of this edge.- Returns:
- The label of this edge.
-
hashCode
public int hashCode() -
equals
-
toString
-
isVertex
public boolean isVertex()Description copied from class:QueryGraphCPQ.QueryGraphComponent
Checks if this query graph component is a vertex.- Specified by:
isVertex
in classQueryGraphCPQ.QueryGraphComponent
- Returns:
- True if this is a vertex.
- See Also:
-
isEdge
public boolean isEdge()Description copied from class:QueryGraphCPQ.QueryGraphComponent
Checks if this query graph component is an edge.- Specified by:
isEdge
in classQueryGraphCPQ.QueryGraphComponent
- Returns:
- True if this is an edge.
- See Also:
-