Class Edge<T extends Node>

  • Type Parameters:
    T - The type of the nodes this edge connects
    Direct Known Subclasses:
    DirectedEdge, UndirectedEdge

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

      • Edge

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

      • 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.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object