/** * Provides the next step. * * @param plan the planned route * @param fact the currently established route, or * <code>null</code> if nothing is established * * @return one of the constants defined in this class, indicating * either the next step to perform, or success, or failure. * 0 is for success, a negative value for failure. */ public int nextStep(RouteInfo plan, RouteInfo fact) { if (plan == null) { throw new IllegalArgumentException ("Planned route may not be null."); } int step = UNREACHABLE; if ((fact == null) || (fact.getHopCount() < 1)) step = firstStep(plan); else if (plan.getHopCount() > 1) step = proxiedStep(plan, fact); else step = directStep(plan, fact); return step; } // nextStep
/** * Provides the next step. * * @param plan the planned route * @param fact the currently established route, or * <code>null</code> if nothing is established * * @return one of the constants defined in this class, indicating * either the next step to perform, or success, or failure. * 0 is for success, a negative value for failure. */ public int nextStep(RouteInfo plan, RouteInfo fact) { if (plan == null) { throw new IllegalArgumentException ("Planned route may not be null."); } int step = UNREACHABLE; if ((fact == null) || (fact.getHopCount() < 1)) step = firstStep(plan); else if (plan.getHopCount() > 1) step = proxiedStep(plan, fact); else step = directStep(plan, fact); return step; } // nextStep
/** * Provides the next step. * * @param plan the planned route * @param fact the currently established route, or * <code>null</code> if nothing is established * * @return one of the constants defined in this class, indicating * either the next step to perform, or success, or failure. * 0 is for success, a negative value for failure. */ public int nextStep(RouteInfo plan, RouteInfo fact) { if (plan == null) { throw new IllegalArgumentException ("Planned route may not be null."); } int step = UNREACHABLE; if ((fact == null) || (fact.getHopCount() < 1)) step = firstStep(plan); else if (plan.getHopCount() > 1) step = proxiedStep(plan, fact); else step = directStep(plan, fact); return step; } // nextStep
/** * Provides the next step. * * @param plan the planned route * @param fact the currently established route, or * <code>null</code> if nothing is established * * @return one of the constants defined in this class, indicating * either the next step to perform, or success, or failure. * 0 is for success, a negative value for failure. */ public int nextStep(RouteInfo plan, RouteInfo fact) { if (plan == null) { throw new IllegalArgumentException ("Planned route may not be null."); } int step = UNREACHABLE; if ((fact == null) || (fact.getHopCount() < 1)) step = firstStep(plan); else if (plan.getHopCount() > 1) step = proxiedStep(plan, fact); else step = directStep(plan, fact); return step; } // nextStep
/** * Provides the next step. * * @param plan the planned route * @param fact the currently established route, or * <code>null</code> if nothing is established * * @return one of the constants defined in this class, indicating * either the next step to perform, or success, or failure. * 0 is for success, a negative value for failure. */ public int nextStep(RouteInfo plan, RouteInfo fact) { if (plan == null) { throw new IllegalArgumentException ("Planned route may not be null."); } int step = UNREACHABLE; if ((fact == null) || (fact.getHopCount() < 1)) step = firstStep(plan); else if (plan.getHopCount() > 1) step = proxiedStep(plan, fact); else step = directStep(plan, fact); return step; } // nextStep
/** * Provides the next step. * * @param plan the planned route * @param fact the currently established route, or * {@code null} if nothing is established * * @return one of the constants defined in this class, indicating * either the next step to perform, or success, or failure. * 0 is for success, a negative value for failure. */ @Override public int nextStep(final RouteInfo plan, final RouteInfo fact) { Args.notNull(plan, "Planned route"); int step = UNREACHABLE; if ((fact == null) || (fact.getHopCount() < 1)) { step = firstStep(plan); } else if (plan.getHopCount() > 1) { step = proxiedStep(plan, fact); } else { step = directStep(plan, fact); } return step; } // nextStep
/** * Provides the next step. * * @param plan the planned route * @param fact the currently established route, or * {@code null} if nothing is established * * @return one of the constants defined in this class, indicating * either the next step to perform, or success, or failure. * 0 is for success, a negative value for failure. */ @Override public int nextStep(final RouteInfo plan, final RouteInfo fact) { Args.notNull(plan, "Planned route"); int step = UNREACHABLE; if ((fact == null) || (fact.getHopCount() < 1)) { step = firstStep(plan); } else if (plan.getHopCount() > 1) { step = proxiedStep(plan, fact); } else { step = directStep(plan, fact); } return step; } // nextStep
/** * Provides the next step. * * @param plan the planned route * @param fact the currently established route, or * {@code null} if nothing is established * * @return one of the constants defined in this class, indicating * either the next step to perform, or success, or failure. * 0 is for success, a negative value for failure. */ @Override public int nextStep(final RouteInfo plan, final RouteInfo fact) { Args.notNull(plan, "Planned route"); int step = UNREACHABLE; if ((fact == null) || (fact.getHopCount() < 1)) { step = firstStep(plan); } else if (plan.getHopCount() > 1) { step = proxiedStep(plan, fact); } else { step = directStep(plan, fact); } return step; } // nextStep
/** * Provides the next step. * * @param plan the planned route * @param fact the currently established route, or * {@code null} if nothing is established * * @return one of the constants defined in this class, indicating * either the next step to perform, or success, or failure. * 0 is for success, a negative value for failure. */ @Override public int nextStep(final RouteInfo plan, final RouteInfo fact) { Args.notNull(plan, "Planned route"); int step = UNREACHABLE; if ((fact == null) || (fact.getHopCount() < 1)) { step = firstStep(plan); } else if (plan.getHopCount() > 1) { step = proxiedStep(plan, fact); } else { step = directStep(plan, fact); } return step; } // nextStep
/** * Provides the next step. * * @param plan the planned route * @param fact the currently established route, or * {@code null} if nothing is established * * @return one of the constants defined in this class, indicating * either the next step to perform, or success, or failure. * 0 is for success, a negative value for failure. */ @Override public int nextStep(final RouteInfo plan, final RouteInfo fact) { Args.notNull(plan, "Planned route"); int step = UNREACHABLE; if ((fact == null) || (fact.getHopCount() < 1)) { step = firstStep(plan); } else if (plan.getHopCount() > 1) { step = proxiedStep(plan, fact); } else { step = directStep(plan, fact); } return step; } // nextStep
/** * Provides the next step. * * @param plan the planned route * @param fact the currently established route, or * <code>null</code> if nothing is established * * @return one of the constants defined in this class, indicating * either the next step to perform, or success, or failure. * 0 is for success, a negative value for failure. */ public int nextStep(final RouteInfo plan, final RouteInfo fact) { Args.notNull(plan, "Planned route"); int step = UNREACHABLE; if ((fact == null) || (fact.getHopCount() < 1)) { step = firstStep(plan); } else if (plan.getHopCount() > 1) { step = proxiedStep(plan, fact); } else { step = directStep(plan, fact); } return step; } // nextStep