Class InfrastructureLaneChangeInfo

    • Constructor Detail

      • InfrastructureLaneChangeInfo

        protected InfrastructureLaneChangeInfo​(int requiredNumberOfLaneChanges,
                                               boolean deadEnd)
        Constructor for subclasses.
        Parameters:
        requiredNumberOfLaneChanges - int; required number of lane changes
        deadEnd - boolean; whether the need to change lane comes from a dead-end
      • InfrastructureLaneChangeInfo

        public InfrastructureLaneChangeInfo​(int requiredNumberOfLaneChanges,
                                            LaneStructureRecord record,
                                            RelativePosition relativePosition,
                                            boolean deadEnd,
                                            LateralDirectionality lat)
        Constructor.
        Parameters:
        requiredNumberOfLaneChanges - int; required number of lane changes
        record - LaneStructureRecord; record who's end defines the remaining distance
        relativePosition - RelativePosition; critical relative position (i.e. nose when driving forward)
        deadEnd - boolean; whether the need to change lane comes from a dead-end
        lat - LateralDirectionality; lateral directionality of required lane changes
        Throws:
        IllegalArgumentException - if required number of lane changes or remaining distance is negative
        NullPointerException - if remaining distance is null
    • Method Detail

      • getRequiredNumberOfLaneChanges

        public final int getRequiredNumberOfLaneChanges()
        Returns:
        requiredNumberOfLaneChanges required number of lane changes.
      • getRemainingDistance

        public Length getRemainingDistance()
        Returns:
        remainingDistance remaining distance to perform required lane changes.
      • isDeadEnd

        public final boolean isDeadEnd()
        Returns:
        whether this reason to change lane is due to a dead-end.
      • setDeadEnd

        public final void setDeadEnd​(boolean deadEnd)
        Sets whether this reason to change lane is due to a dead-end.
        Parameters:
        deadEnd - boolean; whether the need to change lane comes from a dead-end
      • getLateralDirectionality

        public final LateralDirectionality getLateralDirectionality()
        Returns the lateral directionality of the required lane changes.
        Returns:
        LateralDirectionality; lateral directionality of the required lane changes
      • left

        public final InfrastructureLaneChangeInfo left​(LaneStructureRecord rec,
                                                       RelativePosition rel,
                                                       boolean dead)
        Returns lane change info for one lane towards the left.
        Parameters:
        rec - LaneStructureRecord; record who's end defines the remaining distance
        rel - RelativePosition; critical relative position (i.e. nose when driving forward)
        dead - boolean; whether the need to change lane comes from a dead-end
        Returns:
        InfrastructureLaneChangeInfo; lane change info for one lane towards the left
      • right

        public final InfrastructureLaneChangeInfo right​(LaneStructureRecord rec,
                                                        RelativePosition rel,
                                                        boolean dead)
        Returns lane change info for one lane towards the right.
        Parameters:
        rec - LaneStructureRecord; record who's end defines the remaining distance
        rel - RelativePosition; critical relative position (i.e. nose when driving forward)
        dead - boolean; whether the need to change lane comes from a dead-end
        Returns:
        InfrastructureLaneChangeInfo; lane change info for one lane towards the right
      • fromInaccessibleLane

        public static InfrastructureLaneChangeInfo fromInaccessibleLane​(boolean deadEnd)
        Returns an instance for the case the entire lane is inaccessible.
        Parameters:
        deadEnd - boolean; dead end
        Returns:
        instance for the case the entire lane is inaccessible