private void modifyUpperIndex(final int group, final int addValue) {
        Integer groupKey = this.groupToStart.higherKey(group);
        while (groupKey != null) {
            final int groupStart = this.groupToStart.get(groupKey);
            this.groupToStart.put(groupKey, groupStart + addValue);
            this.startToGroup.remove(groupStart);
            this.startToGroup.put(groupStart + addValue, groupKey);

            groupKey = this.groupToStart.higherKey(groupKey);
        }
    }
returns the list index for the first object found in given group and fulfilling given test, or -1 if there's no such object
main/src/main/java/cgeo/geocaching/utils/GroupedList.java