private int groupForInternal(final int index) {
        final Map.Entry<Integer, Integer> groupEntry = this.startToGroup.floorEntry(index);
        return (groupEntry == null ? -1 : groupEntry.getValue());
    }
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