Class LinkDirection

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    DirectedLinkPosition

    public class LinkDirection
    extends java.lang.Object
    implements java.io.Serializable
    Storage for a Link and a GTUDirectionality.

    Copyright (c) 2013-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
    BSD-style license. See OpenTrafficSim License.

    $LastChangedDate: 2015-07-24 02:58:59 +0200 (Fri, 24 Jul 2015) $, @version $Revision: 1147 $, by $Author: averbraeck $, initial version Dec 2, 2015
    Author:
    Alexander Verbraeck, Peter Knoppers
    See Also:
    Serialized Form
    • Constructor Detail

      • LinkDirection

        public LinkDirection​(Link link,
                             GTUDirectionality direction)
        Parameters:
        link - Link; the link
        direction - GTUDirectionality; the direction on the link, with or against the design line
    • Method Detail

      • getLink

        public final Link getLink()
        Returns:
        link
      • getId

        public java.lang.String getId()
        Returns:
        String; link id
        See Also:
        Link.getId()
      • getNodeTo

        public final Node getNodeTo()
        Returns:
        the destination node of the linkdirection
      • getNodeFrom

        public final Node getNodeFrom()
        Returns:
        the origin node of the linkdirection
      • hashCode

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

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object