in datasketches-memory-java8/src/main/java/org/apache/datasketches/memory/internal/ResourceImpl.java [331:341]
public boolean isSameResource(final Resource that) {
checkValid();
if (that == null) { return false; }
final ResourceImpl that1 = (ResourceImpl) that;
that1.checkValid();
if (this == that1) { return true; }
return getCumulativeOffset(0) == that1.getCumulativeOffset(0)
&& getCapacity() == that1.getCapacity()
&& getUnsafeObject() == that1.getUnsafeObject()
&& getByteBuffer() == that1.getByteBuffer();
}