public interface Positional extends Resource
0 <= start <= position <= end <= capacity
.setStartPositionEnd(long, long, long)
defaultMemReqSvr
Modifier and Type | Method and Description |
---|---|
long |
getEnd()
Gets the end position
|
long |
getPosition()
Gets the current position
|
long |
getRemaining()
The number of elements remaining between the current position and the end position
|
long |
getStart()
Gets start position
|
boolean |
hasRemaining()
Returns true if there are elements remaining between the current position and the end position
|
Positional |
incrementPosition(long increment)
Increments the current position by the given increment.
|
Positional |
resetPosition()
Resets the current position to the start position,
This does not modify any data.
|
Positional |
setPosition(long position)
Sets the current position.
|
Positional |
setStartPositionEnd(long start,
long position,
long end)
Sets start position, current position, and end position.
|
close, equalTo, equalTo, force, getCapacity, getCumulativeOffset, getCumulativeOffset, getMemoryRequestServer, getRelativeOffset, getTypeByteOrder, hasByteBuffer, hasMemoryRequestServer, isAlive, isByteOrderCompatible, isCloseable, isDirect, isDuplicate, isHeap, isLoaded, isMapped, isMemory, isNonNativeOrder, isReadOnly, isRegionView, isSameResource, load, setMemoryRequestServer, toString, toString, xxHash64, xxHash64
Positional incrementPosition(long increment)
increment
- the given incrementBufferPositionInvariantsException
- if positional invariants have been violated.long getEnd()
long getPosition()
long getStart()
long getRemaining()
(end - position)
boolean hasRemaining()
(end - position) > 0
Positional resetPosition()
Positional setPosition(long position)
position
- the given current position.BufferPositionInvariantsException
- if positional invariants have been violated.Positional setStartPositionEnd(long start, long position, long end)
start
- the start position in the bufferposition
- the current position between the start and endend
- the end position in the bufferBufferPositionInvariantsException
- if positional invariants have been violated.Copyright © 2015–2024. All rights reserved.