Class Edge<T extends Node>

java.lang.Object
org.tweetyproject.graphs.GeneralEdge<T>
org.tweetyproject.graphs.Edge<T>
Type Parameters:
T - The type of the nodes this edge connects
Direct Known Subclasses:
Ark, BpmnEdge, DirectedEdge, MarkingEdge, UndirectedEdge

public abstract class Edge<T extends Node> extends GeneralEdge<T>
Instances of this class represent abstract edges.
Author:
Matthias Thimm
  • Constructor Summary

    Constructors
    Constructor
    Description
    Edge(T nodeA, T nodeB)
    Creates a new edge for the given nodes.
    Edge(T nodeA, T nodeB, String label)
    Creates a new edge for the given nodes.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    Returns the label of this edge.
    Returns the first node of this edge.
    Returns the second node of this edge.
    int
     

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Edge

      public Edge(T nodeA, T nodeB)
      Creates a new edge for the given nodes.
      Parameters:
      nodeA - some node.
      nodeB - some node.
    • Edge

      public Edge(T nodeA, T nodeB, String label)
      Creates a new edge for the given nodes.
      Parameters:
      nodeA - some node.
      nodeB - some node.
      label - some edge label.
  • Method Details

    • getNodeA

      public T getNodeA()
      Returns the first node of this edge.
      Returns:
      the first node of this edge.
    • getNodeB

      public T getNodeB()
      Returns the second node of this edge.
      Returns:
      the second node of this edge.
    • getLabel

      public String getLabel()
      Returns the label of this edge.
      Returns:
      the label of this edge.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object