/** * Check if navigation target is present in current target. * * @param target * navigation target to check for * @return true if navigation target is found in some position */ public boolean containsTarget(Class<? extends Component> target) { return getRoutes().contains(target); }
/** * Remove route for given path. This will remove all targets registered for * given path. * <p> * In case there exists another path mapping for any of the removed route * targets the main class-to-string mapping will be updated to the first * found. * * @param path * path from which to remove routes from */ public void removeRoute(String path) { if (!hasRoute(path)) { return; } RouteTarget removedRoute = getRoutesMap().remove(path); for (Class<? extends Component> targetRoute : removedRoute .getRoutes()) { updateMainRouteTarget(targetRoute); } }