@SuppressWarnings("unchecked")
    private boolean contains(final int idx, final long id, final boolean doPut) {
        final long[] a = al[idx];
        int offset = a.length;
        int n = 0;

        while ((offset >>= 1) > 0) {
            final int nn = n + offset;
            if (a[nn] <= id) {
                n = nn;
            }
        }
        if (a[n] == id) {
            valueOut = (V) vla[idx][n];
            if (doPut) {
                vla[idx][n] = valueIn;
            }
            return true;
        }
        return false;
    }
@return true if "id" is contained in this set.
main/src/main/java/cgeo/geocaching/brouter/util/CompactLongMap.java