Module java.base

Interface SequenceLayout

All Superinterfaces:
MemoryLayout

public sealed interface SequenceLayout extends MemoryLayout
A compound layout that denotes a homogeneous repetition of a given element layout. The repetition count is said to be the sequence layout's element count. A sequence layout can be thought of as a struct layout where the sequence layout's element layout is repeated a number of times that is equal to the sequence layout's element count. In other words this layout:
MemoryLayout.sequenceLayout(3, ValueLayout.JAVA_INT.withOrder(ByteOrder.BIG_ENDIAN));
is equivalent to the following layout:
MemoryLayout.structLayout(
    ValueLayout.JAVA_INT.withOrder(ByteOrder.BIG_ENDIAN),
    ValueLayout.JAVA_INT.withOrder(ByteOrder.BIG_ENDIAN),
    ValueLayout.JAVA_INT.withOrder(ByteOrder.BIG_ENDIAN));
Implementation Requirements:
This class is immutable, thread-safe and value-based.
Since:
22