in src/main/java/org/apache/datasketches/memory/Resource.java [106:121]
int compareTo(long thisOffsetBytes,
long thisLengthBytes,
Resource that,
long thatOffsetBytes,
long thatLengthBytes);
/**
* Returns true if the given object is an instance of this class and has equal contents to
* this object.
* @param that the given Resource object
* @return true if the given object has equal contents to this object.
*/
default boolean equalTo(Resource that) {
if (that == null || this.getCapacity() != that.getCapacity()) { return false; }
return equalTo(0, that, 0, that.getCapacity());
}