protected boolean contains(final long id, final boolean doPut) {
        // determine the first empty array
        int bp = size; // treat size as bitpattern
        int idx = 1;

        while (bp != 0) {
            if ((bp & 1) == 1 && contains(idx, id, doPut)) { // array at idx is valid, check
                return true;
            }
            idx++;
            bp >>= 1;
        }
        return false;
    }
@return true if "id" is contained in this set.
main/src/main/java/cgeo/geocaching/brouter/util/CompactLongMap.java