class ByteKeyRange implements Serializable,
        HasDefaultTracker<
            ByteKeyRange, org.apache.beam.sdk.transforms.splittabledofn.ByteKeyRangeTracker> {

  public List<ByteKey> split(int numSplits) {
    checkArgument(numSplits > 0, "numSplits %s must be a positive integer", numSplits);

    try {
      ImmutableList.Builder<ByteKey> ret = ImmutableList.builder();
      ret.add(startKey);
      for (int i = 1; i < numSplits; ++i) {
        ret.add(interpolateKey(i / (double) numSplits));
      }
      ret.add(endKey);
      return ret.build();
    } catch (IllegalStateException e) {
      // The range is not splittable -- just return
      return ImmutableList.of(startKey, endKey);
    }
  }

  private  ByteKeyRange(ByteKey startKey, ByteKey endKey);

}