class SubRange implements Serializable, Comparable<SubRange> {

  public Optional<SubRange> intersection(SubRange other) {
    int start = Integer.max(_start, other._start);
    int end = Integer.min(_end, other._end);
    return start <= end ? Optional.of(new SubRange(start, end)) : Optional.empty();
  }

  public  SubRange(int start, int end);
  @JsonCreator public  SubRange(@Nullable Object o);

}