Class IntPtr.Buffer
java.lang.Object
overrungl.struct.GroupType
overrungl.util.IntPtr
overrungl.util.IntPtr.Buffer
- All Implemented Interfaces:
Addressable
- Enclosing class:
IntPtr
-
Nested Class Summary
Nested classes/interfaces inherited from class overrungl.util.IntPtr
IntPtr.Buffer
-
Field Summary
Fields inherited from class overrungl.util.IntPtr
LAYOUT, LAYOUT_value, OFFSET_value, VH_value
-
Constructor Summary
ConstructorsConstructorDescriptionBuffer
(MemorySegment segment, long elementCount) CreatesIntPtr.Buffer
with the given segment. -
Method Summary
Modifier and TypeMethodDescriptionasSlice
(long index) Creates a slice ofIntPtr
.asSlice
(long index, long count) Creates a slice ofIntPtr
.long
Estimates the element count of this group type buffer.int
valueAt
(long index) Returnsvalue
at the given index.valueAt
(long index, int value) Setsvalue
with the given value at the given index.Methods inherited from class overrungl.util.IntPtr
alloc, alloc, allocInit, asBuffer, copyFrom, of, ofNative, ofNative, value, value, value, value
Methods inherited from class overrungl.struct.GroupType
estimateCount, groupLayout, segment
-
Constructor Details
-
Buffer
CreatesIntPtr.Buffer
with the given segment.- Parameters:
segment
- the memory segmentelementCount
- the element count
-
-
Method Details
-
estimateCount
public long estimateCount()Description copied from class:GroupType
Estimates the element count of this group type buffer.- Overrides:
estimateCount
in classGroupType
- Returns:
- the estimated element count of the group type buffer
-
asSlice
Creates a slice ofIntPtr
.- Parameters:
index
- the index of the struct buffer- Returns:
- the slice of
IntPtr
-
asSlice
Creates a slice ofIntPtr
.- Parameters:
index
- the index of the struct buffercount
- the count- Returns:
- the slice of
IntPtr
-
valueAt
public int valueAt(long index) Returnsvalue
at the given index.- Parameters:
index
- the index of the struct buffer- Returns:
value
at the given index
-
valueAt
Setsvalue
with the given value at the given index.- Parameters:
index
- the index of the struct buffervalue
- the value- Returns:
this
-