@Override
  public boolean equals(Object obj) {
    if (this == obj) {
      return true;
    }
    if (obj == null) {
      return false;
    }
    if (!(obj instanceof ByteRange)) {
      return false;
    }
    return compareTo((ByteRange) obj) == 0;
  }
Returns true when {@code range} is of zero length, false otherwise.
hbase-common/src/main/java/org/apache/hadoop/hbase/util/AbstractByteRange.java