Interface Group<L extends GroupLayout, T extends Group<L,T> >
public sealed interface Group<L extends GroupLayout, T extends Group<L,T>>
permits Struct<T>, Union<T>
A struct or union interface may extend this capability interface to expose
GroupBinder functionality at the instance level.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionlongaddress()Returns the memory address of this group.default longalignof()Returns the alignment, in bytes, of this group.default MemorySegmentReturns a memory segment view of this group.clear()Clears the content of this group.Copies the content of the specified source group to this group.get(MemorySegment segment) Copies the content of the specified memory segment to this group.get(MemorySegment segment, long offset) Copies the content of the specified memory segment at the given offset to this group.getAtIndex(MemorySegment segment, long index) Copies the content of the specified memory segment at the given index to this group.layout()Returns the layout of this group.set(MemorySegment segment) Copies the content of this group to the specified memory segment.set(MemorySegment array, long offset) Copies the content of this group to the specified memory segment at the given offset.setAtIndex(MemorySegment array, long index) Copies the content of this group to the specified memory segment at the given index.default longsizeof()Returns the size, in bytes, of this group.
-
Method Details
-
layout
-
address
long address()Returns the memory address of this group.- Returns:
- the memory address
-
copyFrom
-
clear
-
get
Copies the content of the specified memory segment to this group.- Parameters:
segment- the source memory segment- Returns:
- this group
-
get
Copies the content of the specified memory segment at the given offset to this group.- Parameters:
segment- the source memory segmentoffset- the offset within the segment- Returns:
- this group
-
getAtIndex
Copies the content of the specified memory segment at the given index to this group.- Parameters:
segment- the source memory segmentindex- the index within the segment- Returns:
- this group
-
set
Copies the content of this group to the specified memory segment.- Parameters:
segment- the target memory segment- Returns:
- this groupn
-
set
Copies the content of this group to the specified memory segment at the given offset.- Parameters:
array- the target memory segmentoffset- the offset within the segment- Returns:
- this group
-
setAtIndex
Copies the content of this group to the specified memory segment at the given index.- Parameters:
array- the target memory segmentindex- the index within the segment- Returns:
- this group
-
sizeof
default long sizeof()Returns the size, in bytes, of this group.- Returns:
- the size
-
alignof
default long alignof()Returns the alignment, in bytes, of this group.- Returns:
- the alignment
-
asSegment
Returns a memory segment view of this group.- Returns:
- the memory segment
-