class TypedRange implements Comparable<TypedRange<T>> {

  @Override
  public boolean equals(Object obj) {
    if (this == obj) return true;
    if (obj == null) return false;
    if (getClass() != obj.getClass()) return false;
    TypedRange<?> other = (TypedRange<?>) obj;
    if (length != other.length) return false;
    if (metadata == null) {
      if (other.metadata != null) return false;
    } else if (!metadata.equals(other.metadata)) return false;
    if (offset != other.offset) return false;
    return true;
  }

  public  TypedRange(long offset, long length, T metadata);

}