Package org.neo4j.gds.core.utils.paged
Interface HugeCursorSupport<Array>
-
- All Known Implementing Classes:
HugeArray,HugeAtomicByteArray,HugeAtomicLongArray,HugeByteArray,HugeDoubleArray,HugeIntArray,HugeLongArray,HugeObjectArray
public interface HugeCursorSupport<Array>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default HugeCursor<Array>initCursor(HugeCursor<Array> cursor)Resets theHugeCursorto range from index 0 untilsize().default HugeCursor<Array>initCursor(HugeCursor<Array> cursor, long start, long end)Resets theHugeCursorto range from indexstart(inclusive, the first index to be contained) untilend(exclusive, the first index not to be contained).HugeCursor<Array>newCursor()Returns a newHugeCursorfor this array.longsize()Returns the length of this array.
-
-
-
Method Detail
-
size
long size()
Returns the length of this array.If the size is greater than zero, the highest supported index is
size() - 1The behavior is identical to calling
array.lengthon primitive arrays.
-
newCursor
HugeCursor<Array> newCursor()
Returns a newHugeCursorfor this array. The cursor is not positioned and in an invalid state. To position the cursor you must callinitCursor(HugeCursor)orinitCursor(HugeCursor, long, long). Then the cursor needs to be put in a valid state by callingHugeCursor.next(). Obtaining aHugeCursorfor an empty array (wheresize()returns0) is undefined and might result in aNullPointerExceptionor anotherRuntimeException.
-
initCursor
default HugeCursor<Array> initCursor(HugeCursor<Array> cursor)
Resets theHugeCursorto range from index 0 untilsize(). The returned cursor is not positioned and in an invalid state. You must callHugeCursor.next()first to position the cursor to a valid state. The returned cursor is the reference-same (==) one as the provided one. Resetting theHugeCursorof an empty array (wheresize()returns0) is undefined and might result in aNullPointerExceptionor anotherRuntimeException.
-
initCursor
default HugeCursor<Array> initCursor(HugeCursor<Array> cursor, long start, long end)
Resets theHugeCursorto range from indexstart(inclusive, the first index to be contained) untilend(exclusive, the first index not to be contained). The returned cursor is not positioned and in an invalid state. You must callHugeCursor.next()first to position the cursor to a valid state. The returned cursor is the reference-same (==) one as the provided one. Resetting theHugeCursorof an empty array (wheresize()returns0) is undefined and might result in aNullPointerExceptionor anotherRuntimeException.- See Also:
initCursor(HugeCursor)
-
-