@SuppressWarnings("unchecked") private void renameRoute( BaseRoute route, BaseRoute routeToWrite, int startIndex, int endIndex, int trackIndex, OutputStream... targets) { // gives splitted TomTomRoute and SimpleRoute routes a more useful name for the fragment if (route.getFormat() instanceof TomTomRouteFormat || route.getFormat() instanceof SimpleFormat || route.getFormat() instanceof GpxFormat && routeToWrite.getFormat() instanceof BcrFormat) { String name = createRouteName(routeToWrite.getPositions().subList(startIndex, endIndex)); if (targets.length > 1) name = "Track" + (trackIndex + 1) + ": " + name; routeToWrite.setName(name); } }
@SuppressWarnings("unchecked") private void commentRoute(BaseRoute route) { commentPositions(route.getPositions()); commentRouteName(route); }