# Uses of Interface
java.lang.foreign.ValueLayout.OfBoolean

Packages that use ValueLayout.OfBoolean
Package
Description
java.lang.foreign
Provides low-level access to memory and functions outside the Java runtime.

## Uses of ValueLayout.OfBoolean in java.lang.foreign

Fields in java.lang.foreign declared as ValueLayout.OfBoolean
Modifier and Type
Field
Description
`static final ValueLayout.OfBoolean`
ValueLayout.`JAVA_BOOLEAN`
A value layout constant whose size is the same as that of a Java `boolean`, byte alignment set to 1, and byte order set to `ByteOrder.nativeOrder()`.
Methods in java.lang.foreign that return ValueLayout.OfBoolean
Modifier and Type
Method
Description
`ValueLayout.OfBoolean`
ValueLayout.OfBoolean.`withByteAlignment(long byteAlignment)`
Returns a memory layout with the same characteristics as this layout, but with the given alignment constraint (in bytes).
`ValueLayout.OfBoolean`
ValueLayout.OfBoolean.`withName(String name)`
Returns a memory layout with the same characteristics as this layout, but with the given name.
`ValueLayout.OfBoolean`
ValueLayout.OfBoolean.`withOrder(ByteOrder order)`
Returns a value layout with the same characteristics as this layout, but with the given byte order.
`ValueLayout.OfBoolean`
ValueLayout.OfBoolean.`withoutName()`
Returns a memory layout with the same characteristics as this layout, but with no name.
Methods in java.lang.foreign with parameters of type ValueLayout.OfBoolean
Modifier and Type
Method
Description
`boolean`
MemorySegment.`get(ValueLayout.OfBoolean layout, long offset)`
Reads a boolean from this segment at the given offset, with the given layout.
`boolean`
MemorySegment.`getAtIndex(ValueLayout.OfBoolean layout, long index)`
Reads a boolean from this segment at the given index, scaled by the given layout size.
`void`
MemorySegment.`set(ValueLayout.OfBoolean layout, long offset, boolean value)`
Writes a boolean into this segment at the given offset, with the given layout.
`void`
MemorySegment.`setAtIndex(ValueLayout.OfBoolean layout, long index, boolean value)`
Writes a boolean into this segment at the given index, scaled by the given layout size.