private ToggleItemState toggleItemInternal(final RouteItem item, final boolean forceAdd, final boolean addToRouteStart) {
        if (segments == null) {
            segments = new ArrayList<>();
        }
        final int pos = (forceAdd ? -1 : pos(item));
        if (pos == -1) {
            final RouteSegment segment = new RouteSegment(item, null, true);
            if (segment.hasPoint()) {
                if (addToRouteStart) {
                    segments.add(0, segment);
                    if (segments.size() > 1) {
                        calculateNavigationRoute(1);
                    }
                } else {
                    segments.add(segment);
                    calculateNavigationRoute(segments.size() - 1);
                }
                return ToggleItemState.ADDED;
            } else {
                return ToggleItemState.ERROR_NO_POINT;
            }
        } else {
            return removeItem(pos);
        }
    }
@param item item to be added or removed
@return ToggleItemState
main/src/main/java/cgeo/geocaching/models/IndividualRoute.java