Class ArcBackward


  • class ArcBackward
    extends Arc
    Implementation of Arc that represents a "backward" arc in a graph, i.e., an arc that is the reverse of another one. This arc only holds a reference to the original arc.
    • Field Detail

      • originalArc

        private final Arc originalArc
    • Constructor Detail

      • ArcBackward

        protected ArcBackward​(Arc originalArc)
        Create a new backward arc which corresponds to the reverse arc of the given arc.
        Parameters:
        originalArc - Original forwarc arc corresponding to this backward arc.
    • Method Detail

      • getOrigin

        public Node getOrigin()
        Specified by:
        getOrigin in class Arc
        Returns:
        Origin node of this arc.
      • getDestination

        public Node getDestination()
        Specified by:
        getDestination in class Arc
        Returns:
        Destination node of this arc.
      • getLength

        public float getLength()
        Specified by:
        getLength in class Arc
        Returns:
        Length of this arc, in meters.
      • getPoints

        public java.util.List<Point> getPoints()
        Specified by:
        getPoints in class Arc
        Returns:
        Points representing segments of this arc.