code: public static int asInt(final long[] data, final int n) {
      if ((data == null) || (data.length == 0)) {
        throw new SketchesArgumentException("Input is null or empty.");
      }
      return asInteger(data, n); //data is long[]
    }
docs: Returns a deterministic uniform random integer between zero (inclusive) and
  n (exclusive) given the input data.
  @param data the input long array.
  @param n The upper exclusive bound of the integers produced. Must be &gt; 1.
  @return deterministic uniform random integer