/** * Sets the time range of cells to return: [<code>minTimestamp</code>, * <code>maxTimestamp</code>). * * @param minTimestamp Request cells with a timestamp at least minTimestamp. * @param maxTimestamp Request cells with a timestamp less than maxTimestamp. * @return This data request builder instance. */ public FijiDataRequestBuilder withTimeRange(long minTimestamp, long maxTimestamp) { checkNotBuilt(); Preconditions.checkArgument(minTimestamp >= 0, "minTimestamp must be positive or zero, but got: %d", minTimestamp); Preconditions.checkArgument(maxTimestamp > minTimestamp, "Invalid time range [%d--%d]", minTimestamp, maxTimestamp); Preconditions.checkState(!mIsTimeRangeSet, "Cannot set time range more than once."); mIsTimeRangeSet = true; mMinTimestamp = minTimestamp; mMaxTimestamp = maxTimestamp; return this; }
/** * Return a builder for columns associated with this FijiDataRequestBuilder. * * <p>Creates an object that allows you to specify a set of related columns attached * to the same FijiDataRequest that all share the same retrieval properties, like * the number of max versions.</p> * * @return a new FijiDataRequestBuilder.ColumnsDef builder object associated with this * data request builder. */ public ColumnsDef newColumnsDef() { checkNotBuilt(); final ColumnsDef c = new ColumnsDef(); mColumnsDefs.add(c); return c; }
checkNotBuilt(); mIsBuilt = true;