public static LongValue nextValue(LongValue value) {
        long v = value.getValue();
        return new LongValue(v < Long.MAX_VALUE ? v + 1 : v);
    }
Gives the next distinct long value.

@param value the base value.
@return the next value.
container-search/src/main/java/com/yahoo/search/grouping/request/LongBucket.java