Replies on which direction the bus halt is located on the road segment.

@return {@link Direction1D#SEGMENT_DIRECTION} or {@link Direction1D#REVERTED_DIRECTION}.
557684
@Pure
	public Direction1D getRoadSegmentDirection() {
		final BusItinerary itinerary = getContainer();
		if (itinerary != null && this.roadSegmentIndex >= 0 && this.roadSegmentIndex < itinerary.getRoadSegmentCount()) {
			return itinerary.getRoadSegmentDirection(this.roadSegmentIndex);
		}
		return null;
	}
929587
public boolean nextInOrder() {
        if (mNode == null) {
            return false;
        }
        if (firstChild()) {
            return true;
        }
        if (nextSibling()) {
            return true;
        }
        AccessibilityNodeInfoRef tmp = unOwned(mNode);
        while (tmp.parent()) {
            if (tmp.nextSibling()) {
                reset(tmp);
                return true;
            }
        }
        tmp.clear();
        return false;
    }
27422
public Direction direction() {
        double range = this.end - this.start;
        if (!Op.isFinite(range) || Op.isEq(range, 0.0)) {
            return Direction.Zero;
        }
        if (Op.isGt(range, 0.0)) {
            return Direction.Positive;
        }
        return Direction.Negative;
    }
494055
public static int toIsoDirection (int dir)
    {
        if (dir != DirectionCodes.NONE) {
            // rotate the direction clockwise (ie. change SOUTHEAST to
            // SOUTH)
            dir = DirectionUtil.rotateCW(dir, 2);
        }
        return dir;
    }
285916
@Pure
	public CrossRoad getFirstJunctionPoint() {
		RoadConnection point = getFirstPoint();
		double distance = 0;
		RoadSegment beforeSegment = null;
		RoadSegment afterSegment = null;
		int beforeSegmentIndex = -1;
		int afterSegmentIndex = -1;
		boolean found = false;
		if (point != null) {
			int index = 0;
			for (final RoadSegment sgmt : this) {
				if (found) {
					afterSegment = sgmt;
					afterSegmentIndex = index;
					//stop now
					break;
				}

				point = sgmt.getOtherSidePoint(point);
				beforeSegment = sgmt;
				beforeSegmentIndex = index;
				distance += sgmt.getLength();
				final int count = point.getConnectedSegmentCount();
				if (count != 2) {
					found = true;
				}
				++index;
			}
		}

		if (found) {
			return new CrossRoad(point, beforeSegment, beforeSegmentIndex,
					afterSegment, afterSegmentIndex, distance, distance);
		}

		return null;
	}
927981
@Pure
	public boolean insideBusHub() {
		final BusStop busStop = getBusStop();
		if (busStop != null) {
			return busStop.insideBusHub();
		}
		return false;
	}
621434
@Pure
	public final BusStop getNearestBusStop(Point2D<?, ?> point) {
		return getNearestBusStop(point.getX(), point.getY());
	}
488191
public com.google.api.ads.admanager.axis.v201902.LockedOrientation getLockedOrientation() {
        return lockedOrientation;
    }
793779
public function determineSelectedRoute()
    {
        if (empty($this->routes))
        {
            $this->getRoutingTable();
        }

        if (empty($this->segments)) {
            $this->segments = array('/');
        }

        $currentLevel = &$this->routes;
        //$parentSegment = '/';
        $index = 0;
        $isRoot = true;

        foreach ($this->segments as $segment) {
            $segmentIsInteger = is_numeric($segment);

            //Static route test, numeric segments are not allowed to be traversed
            if (!$segmentIsInteger && !empty($currentLevel[$segment])) {
                $this->addDebugMessage("Traversing " . $segment);

                $currentLevel = &$currentLevel[$segment];
                $index = 0;
                $isRoot = false;
                continue;
            }

            if ($isRoot && !empty($this->routes['/'])) {
                $currentLevel = &$this->routes['/'];
            }

            //We've hit a dead end here. The current tree branch does not have a static segment to match $segment
            if (!empty($currentLevel))
            {
                foreach ($currentLevel as $route) {
                    if ($route instanceof \Slab\Router\Route) {
                        $this->addDebugMessage("Checking route " . $route->getName());

                        $validationDebug = [];
                        if ($route->validateDynamicPattern($this->currentRequest, $validationDebug)) {
                            $this->addDebugMessage("Dynamic pattern match for route " . $route->getName());

                            $this->selectedRoute = &$route;
                            return true;
                        }
                    }

                    ++$index;
                }
            }

            $this->addDebugMessage("All hope is lost!");

            return false;
        }

        if (!empty($currentLevel))
        {
            foreach ($currentLevel as &$route)
            {
                if (!($route instanceof \Slab\Router\Route)) continue;

                /**
                 * @var \Slab\Router\Route $route
                 */
                if (!$route->isDynamic())
                {
                    $this->selectedRoute = &$route;
                    $this->addDebugMessage("Found matching static route: " . $this->selectedRoute->getName());

                    return true;
                }
                else
                {
                    $validationDebug = [];
                    if ($route->validateDynamicPattern($this->currentRequest, $validationDebug))
                    {
                        $this->selectedRoute = &$route;
                        $this->addDebugMessage("Found matching dynamic route: " . $this->selectedRoute->getName());

                        return true;
                    }
                }
            }

        }

        $this->addDebugMessage("Unable to find a matching route.");

        return false;
    }
129870
private String getDirectionString(String direction) {
        if (direction == null || !(direction.equals("Start") || direction.equals("End"))) {
            getLogger().debug("Unrecognized direction string. The standard value 'Start' will be used.");
            return "Start";
        }
        return direction;
    }
863346
public String getDestination()
  {
    if (tc.isEntryEnabled())
    {
      SibTr.entry(tc, "getDestination");
      SibTr.exit(tc, "getDestination", destination);
    }

    return destination;
  }
202827
private double computeAngle(RoadPolyline segment, boolean fromStartPoint) {
		double angle = Double.NaN;
		Point2d p1 = null;
		Point2d p2 = null;
		if (segment.getPointCount() > 1) {
			if (fromStartPoint) {
				final RoadConnection startPoint = segment.getBeginPoint(StandardRoadConnection.class);
				if (startPoint == this) {
					p1 = startPoint.getPoint();
					p2 = segment.getPointAt(1);
					// Because the Y axis is directly to the bottom of the screen
					// it is necessary to invert it to reply an counterclockwise angle
					angle = MathUtil.clampCyclic(
							Vector2D.signedAngle(
									1, 0, p2.getX() - p1.getX(), p1.getY() - p2.getY()),
							0, MathConstants.TWO_PI);
				} else {
					throw new IllegalArgumentException(
							Locale.getString("ERROR_ALREADY_CONNECTED_START", //$NON-NLS-1$
									segment,
									p1,
									p2,
									startPoint));
				}
			} else {
				final RoadConnection endPoint = segment.getEndPoint(StandardRoadConnection.class);
				if (endPoint == this) {
					p1 = endPoint.getPoint();
					p2 = segment.getAntepenulvianPoint();
					// Because the Y axis is directly to the bottom of the screen
					// it is necessary to invert it to reply an counterclockwise angle
					angle = MathUtil.clampCyclic(
							Vector2D.signedAngle(
									1, 0, p2.getX() - p1.getX(), p1.getY() - p2.getY()),
							0, MathConstants.TWO_PI);
				} else {
					throw new IllegalArgumentException(
							Locale.getString("ERROR_ALREADY_CONNECTED_END", //$NON-NLS-1$
									segment,
									p1,
									p2,
									endPoint));
				}
			}

			if (Double.isNaN(angle) || Double.isInfinite(angle)) {
				throw new IllegalArgumentException(
						Locale.getString("ERROR_SAME_POINTS", //$NON-NLS-1$
								segment, p1, p2));
			}
		} else {
			throw new IllegalArgumentException(
					Locale.getString("ERROR_NOT_ENOUGH_POINTS", //$NON-NLS-1$
							segment));
		}

		return angle;
	}
1203853
private ResultPoint[] detectSolid1(ResultPoint[] cornerPoints) {
    // 0  2
    // 1  3
    ResultPoint pointA = cornerPoints[0];
    ResultPoint pointB = cornerPoints[1];
    ResultPoint pointC = cornerPoints[3];
    ResultPoint pointD = cornerPoints[2];

    int trAB = transitionsBetween(pointA, pointB);
    int trBC = transitionsBetween(pointB, pointC);
    int trCD = transitionsBetween(pointC, pointD);
    int trDA = transitionsBetween(pointD, pointA);

    // 0..3
    // :  :
    // 1--2
    int min = trAB;
    ResultPoint[] points = {pointD, pointA, pointB, pointC};
    if (min > trBC) {
      min = trBC;
      points[0] = pointA;
      points[1] = pointB;
      points[2] = pointC;
      points[3] = pointD;
    }
    if (min > trCD) {
      min = trCD;
      points[0] = pointB;
      points[1] = pointC;
      points[2] = pointD;
      points[3] = pointA;
    }
    if (min > trDA) {
      points[0] = pointC;
      points[1] = pointD;
      points[2] = pointA;
      points[3] = pointB;
    }

    return points;
  }
923230
public synchronized Segment lastSegment() {
    assertOpen();
    Map.Entry<Long, Segment> segment = segments.lastEntry();
    return segment != null ? segment.getValue() : null;
  }
478142
@Pure
	public static List<String> getSystemDefaults(TrafficDirection direction) {
		final List<String> array = new ArrayList<>();
		try {
			int i = 0;
			while (true) {
				array.add(getSystemDefault(direction, i));
				++i;
			}
		} catch (AssertionError e) {
			throw e;
		} catch (Throwable exception) {
			//
		}
		return array;
	}
1081256
public Direction direction() {
        if (direction > start) {
            return Direction.Positive;
        }
        if (direction < start) {
            return Direction.Negative;
        }
        return Direction.Undefined;
    }
536498
@Pure
	public Map<BusItineraryHalt, Pair<Integer, Double>> getBusHaltBinding() {
		final Comparator<BusItineraryHalt> comp = (elt1, elt2) -> {
			if (elt1 == elt2) {
				return 0;
			}
			if (elt1 == null) {
				return -1;
			}
			if (elt2 == null) {
				return 1;
			}
			return elt1.getName().compareTo(elt2.getName());
		};
		final Map<BusItineraryHalt, Pair<Integer, Double>> haltBinding = new TreeMap<>(comp);
		for (final BusItineraryHalt halt : busHalts()) {
			haltBinding.put(halt, new Pair<>(
					halt.getRoadSegmentIndex(),
					halt.getPositionOnSegment()));
		}
		return haltBinding;
	}