Skip to content

Commit 9a3b29b

Browse files
committed
Improve javadoc for 'isSameResource(...)'
1 parent 8ef26d7 commit 9a3b29b

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/main/java/org/apache/datasketches/memory/Resource.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -254,14 +254,16 @@ boolean equalTo(
254254
boolean isRegion();
255255

256256
/**
257-
* Returns true if the underlying resource is the same underlying resource as <i>that</i>.
257+
* Returns true if the underlying resource is the same resource as <i>that</i>.
258258
*
259-
* <p>Note: for on-heap resources neither <i>this</i> nor <i>that</i> can be read-only.</p>
259+
* <p>Two resources are considered the same if one were to write a value at offset A in one resource
260+
* and that same value appears in the other resource at the same offset A. In other words,
261+
* if two regions (or slices) are derived from the same underlying resource they both must have the same
262+
* starting offset with respect to the resource and the same size in order to be considered to be the same resource.</p>
260263
*
261-
* <p>if two sub-regions (or slices) are derived from the same resource they both must have the same
262-
* starting offset with respect to the resource and the same size.</p>
264+
* <p>Note: for on-heap resources neither <i>this</i> nor <i>that</i> can be read-only.</p>
263265
*
264-
* @param that the other Resource object
266+
* @param that the other Resource.
265267
* @return true if the underlying resource is the same underlying resource as <i>that</i>.
266268
*/
267269
boolean isSameResource(Resource that);

0 commit comments

Comments
 (0)