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 Summary
ConstructorDescriptionNextSplitInfo
(Node nextSplitNode, Set<Lane> correctCurrentLanes) NextSplitInfo
(Node nextSplitNode, Set<Lane> correctCurrentLanes, LateralDirectionality requiredDirection) Creates an instance of aNextSplitInfo
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecorrectCurrentLanes
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.final boolean
isSplit()
Returns the value of thenextSplitNode
record component.Returns the value of therequiredDirection
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
NextSplitInfo
- 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 aNextSplitInfo
record class.- Parameters:
nextSplitNode
- the value for thenextSplitNode
record componentcorrectCurrentLanes
- the value for thecorrectCurrentLanes
record componentrequiredDirection
- the value for therequiredDirection
record component
-
-
Method Details
-
isSplit
public final boolean isSplit()- Returns:
- split indicates whether the route splits within the given distance.
-
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. -
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. -
equals
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 withObjects::equals(Object,Object)
. -
nextSplitNode
Returns the value of thenextSplitNode
record component.- Returns:
- the value of the
nextSplitNode
record component
-
correctCurrentLanes
Returns the value of thecorrectCurrentLanes
record component.- Returns:
- the value of the
correctCurrentLanes
record component
-
requiredDirection
Returns the value of therequiredDirection
record component.- Returns:
- the value of the
requiredDirection
record component
-