Record Class NextSplitInfo

java.lang.Object
java.lang.Record
org.opentrafficsim.road.gtu.lane.tactical.NextSplitInfo
Record Components:
nextSplitNode - Node; the first subsequent node at which the route splits.
correctCurrentLanes - Set<Lane>; the lane(s) and/or adjacent lane(s) on which the reference point of the GTU is registered that lead us in the direction of the route provided by the strategical planner.
requiredDirection - LateralDirectionality; required direction for lane changes for this split, beyond lane on current link
All Implemented Interfaces:
Serializable

public record NextSplitInfo(Node nextSplitNode, Set<Lane> correctCurrentLanes, LateralDirectionality requiredDirection) extends Record implements Serializable
This class provides information for an operational plan about the next location where the network splits. if the networks splits, the node where it splits, and the current lanes that lead to the right node are calculated.

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

Author:
Alexander Verbraeck, Peter Knoppers, Wouter Schakel
See Also:
  • Constructor Details

    • NextSplitInfo

      public NextSplitInfo(Node nextSplitNode, Set<Lane> correctCurrentLanes)
      Parameters:
      nextSplitNode - Node; the first subsequent node at which the route splits.
      correctCurrentLanes - Set<Lane>; the lane(s) and/or adjacent lane(s) on which the reference point of the GTU is registered that lead us in the direction of the route provided by the strategical planner.
    • NextSplitInfo

      public NextSplitInfo(Node nextSplitNode, Set<Lane> correctCurrentLanes, LateralDirectionality requiredDirection)
      Creates an instance of a NextSplitInfo record class.
      Parameters:
      nextSplitNode - the value for the nextSplitNode record component
      correctCurrentLanes - the value for the correctCurrentLanes record component
      requiredDirection - the value for the requiredDirection record component
  • Method Details

    • isSplit

      public final boolean isSplit()
      Returns:
      split indicates whether the route splits within the given distance.
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • nextSplitNode

      public Node nextSplitNode()
      Returns the value of the nextSplitNode record component.
      Returns:
      the value of the nextSplitNode record component
    • correctCurrentLanes

      public Set<Lane> correctCurrentLanes()
      Returns the value of the correctCurrentLanes record component.
      Returns:
      the value of the correctCurrentLanes record component
    • requiredDirection

      public LateralDirectionality requiredDirection()
      Returns the value of the requiredDirection record component.
      Returns:
      the value of the requiredDirection record component