Class QueryGraphCPQ.QueryGraphComponent

java.lang.Object
dev.roanh.gmark.lang.cpq.QueryGraphCPQ.QueryGraphComponent
All Implemented Interfaces:
IDable, Comparable<QueryGraphCPQ.QueryGraphComponent>
Direct Known Subclasses:
QueryGraphCPQ.Edge, QueryGraphCPQ.Vertex
Enclosing class:
QueryGraphCPQ

public abstract static sealed class QueryGraphCPQ.QueryGraphComponent extends Object implements IDable, Comparable<QueryGraphCPQ.QueryGraphComponent> permits QueryGraphCPQ.Vertex, QueryGraphCPQ.Edge
Shared base interface for query graph elements. Objects of this type are either a QueryGraphCPQ.Vertex or an QueryGraphCPQ.Edge.
  • Field Details

    • id

      protected int id
      The ID of this component.
  • Constructor Details

    • QueryGraphComponent

      public QueryGraphComponent()
  • Method Details

    • isVertex

      public abstract boolean isVertex()
      Checks if this query graph component is a vertex.
      Returns:
      True if this is a vertex.
      See Also:
    • isEdge

      public abstract boolean isEdge()
      Checks if this query graph component is an edge.
      Returns:
      True if this is an edge.
      See Also:
    • compareTo

      public int compareTo(QueryGraphCPQ.QueryGraphComponent other)
      Specified by:
      compareTo in interface Comparable<QueryGraphCPQ.QueryGraphComponent>
    • getID

      public int getID()
      Description copied from interface: IDable
      Gets the unique ID for this object. This ID uniquely identifies all objects of this type.
      Specified by:
      getID in interface IDable
      Returns:
      The unique ID for this object.