public class RoundaboutInstruction extends Instruction<RoundaboutInstruction>
RoundaboutInstruction.SubType.ENTER instruction should be used. In case of on-trip
navigation an additional RoundaboutInstruction.SubType.EXIT instruction could be useful.
In its minimal form it consists of a position, a getSubType() and at
least one of getOntoStreetName() and getOntoFormOfWay().
Exemplary EBNF of how this instruction can be transformed into human-readable text and what's mandatory / optional. Elements ending with STRING are terminal (not defined any further).
CONTINUE_LANDMARK_STRING must be retrieved from the next Instruction
ROUNDABOUT_INSTRUCTION = ENTER | EXIT;
ENTER = "In the roundabout", [LANDMARK_PART], [ "on" ROUNDABOUT_STREET_NAME_STRING], "take the" [EXIT_NUMBER], "exit",
["onto", NAME_OR_TYPE], [CONFIRMATION_LANDMARK_PART], [CONTINUE];
EXIT = "Exit roundabout now", ["onto", NAME_OR_TYPE], [CONFIRMATION_LANDMARK_PART], [CONTINUE];
EXIT_NUMBER = "first", "second",...;
NAME_OR_TYPE = ONTO_STREET_NAME_STRING | ONTO_FORM_OF_WAY_STRING;
CONTINUE = "and follow it", ["for", UNIT], ["until", CONTINUE_LANDMARK_PART]; (* at least one of the two *)
UNIT = [DISTANCE_STRING], [TIME_STRING]; (* at least one of the two *)
LANDMARK_PART = PREPOSITION, LANDMARK_STRING;
CONTINUE_LANDMARK_PART = PREPOSITION, CONTINUE_LANDMARK_STRING;
CONFIRMATION_LANDMARK_PART = CONFIRMATION_PREPOSITION, CONFIRMATION_LANDMARK_STRING;
PREPOSITION = "before" | "at" | "after";
CONFIRMATION_PREPOSITION = "towards" | "through" | "along" | "past";
| Modifier and Type | Class and Description |
|---|---|
static class |
RoundaboutInstruction.SubType |
| Constructor and Description |
|---|
RoundaboutInstruction() |
getAdditionalInfo, getConfirmationTriggerPosition, getPosition, getPreviewTriggerPosition, getText, setAdditionalInfo, setConfirmationTriggerPosition, setConfirmationTriggerPosition, setPosition, setPosition, setPreviewTriggerPosition, setPreviewTriggerPosition, setTextpublic RoundaboutInstruction.SubType getSubType()
public Optional<Constants.CompassDirection> getCompassDirection()
public Optional<String> getRoundaboutStreetName()
public Optional<String> getOntoStreetName()
public Optional<Constants.FormOfWay> getOntoFormOfWay()
public Optional<String> getContinueUntilIntersectingStreetName()
public Optional<Landmark> getLandmark()
getContinueMeters().public Optional<Landmark> getConfirmationLandmark()
public RoundaboutInstruction setSubType(RoundaboutInstruction.SubType subType)
public RoundaboutInstruction setCompassDirection(Constants.CompassDirection compassDirection)
public RoundaboutInstruction setRoundaboutStreetName(String roundaboutStreetName)
public RoundaboutInstruction setOntoStreetName(String ontoStreetName)
public RoundaboutInstruction setOntoFormOfWay(Constants.FormOfWay ontoFormOfWay)
public RoundaboutInstruction setExitNr(Integer exitNr)
public RoundaboutInstruction setContinueMeters(Integer continueMeters)
public RoundaboutInstruction setContinueSeconds(Integer continueSeconds)
public RoundaboutInstruction setContinueUntilIntersectingStreetName(String continueUntilIntersectingStreetName)
public RoundaboutInstruction setLandmark(Landmark landmark)
public RoundaboutInstruction setConfirmationLandmark(Landmark confirmationLandmark)
public static RoundaboutInstruction createMinimalEnter(GeoJSONCoordinate position)
public static RoundaboutInstruction createMinimalExit(GeoJSONCoordinate position)
public void validate()
ValidatableIllegalArgumentException including a description of the
invalid state is thrown.validate in interface Validatablevalidate in class Instruction<RoundaboutInstruction>public int hashCode()
hashCode in class Instruction<RoundaboutInstruction>public boolean equals(Object obj)
equals in class Instruction<RoundaboutInstruction>public String toString()
toString in class Instruction<RoundaboutInstruction>Copyright © 2018. All rights reserved.