Class Graph.Arc

java.lang.Object
com.amalgamasimulation.graph.Graph.Arc
Enclosing class:
Graph<N,A>

public class Graph.Arc extends Object
Represents an arc of the graph.
  • Field Details

    • id

      protected int id
    • value

      protected A value
    • source

      protected Graph<N,A>.Node source
    • dest

      protected Graph<N,A>.Node dest
  • Method Details

    • getValue

      public A getValue()
      Returns the value of the arc.
      Returns:
      Value of the arc
    • getSource

      public Graph<N,A>.Node getSource()
      Returns the source node of the arc.
      Returns:
      Source node of the arc
    • getDest

      public Graph<N,A>.Node getDest()
      Returns the destination node of the arc.
      Returns:
      Destination node of the arc
    • getId

      public int getId()
      Returns unique identifier of the arc within the graph. Identifier is 0-based sequence number with which the arc was added to the graph
      Returns:
      Unique identifier of the arc within the graph
    • toString

      public String toString()
      Overrides:
      toString in class Object