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

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

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

Fields in java.lang.foreign declared as ValueLayout.OfDoublePREVIEW
Modifier and Type
Field
Description
`static final ValueLayout.OfDoublePREVIEW`
ValueLayout.`JAVA_DOUBLE`
A value layout constant whose size is the same as that of a Java `double`, (platform-dependent) byte alignment set to `ADDRESS.byteSize()`, and byte order set to `ByteOrder.nativeOrder()`.
`static final ValueLayout.OfDoublePREVIEW`
ValueLayout.`JAVA_DOUBLE_UNALIGNED`
An unaligned value layout constant whose size is the same as that of a Java `double` and byte order set to `ByteOrder.nativeOrder()`.
Methods in java.lang.foreign that return ValueLayout.OfDoublePREVIEW
Modifier and Type
Method
Description
`ValueLayout.OfDoublePREVIEW`
ValueLayout.OfDouble.`withByteAlignment(long byteAlignment)`
Returns a memory layout with the same characteristics as this layout, but with the given alignment constraint (in bytes).
`ValueLayout.OfDoublePREVIEW`
ValueLayout.OfDouble.`withName(String name)`
Returns a memory layout with the same characteristics as this layout, but with the given name.
`ValueLayout.OfDoublePREVIEW`
ValueLayout.OfDouble.`withOrder(ByteOrder order)`
Returns a value layout with the same characteristics as this layout, but with the given byte order.
`ValueLayout.OfDoublePREVIEW`
ValueLayout.OfDouble.`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.OfDoublePREVIEW
Modifier and Type
Method
Description
`default MemorySegmentPREVIEW`
SegmentAllocator.`allocate(ValueLayout.OfDoublePREVIEW layout, double value)`
Allocates a memory segment with the given layout and initializes it with the given double value.
`default MemorySegmentPREVIEW`
SegmentAllocator.`allocateArray(ValueLayout.OfDoublePREVIEW elementLayout, double... elements)`
Allocates a memory segment with the given layout and initializes it with the given double elements.
`default double`
MemorySegment.`get(ValueLayout.OfDoublePREVIEW layout, long offset)`
Reads a double from this segment at the given offset, with the given layout.
`default double`
MemorySegment.`getAtIndex(ValueLayout.OfDoublePREVIEW layout, long index)`
Reads a double from this segment at the given index, scaled by the given layout size.
`default void`
MemorySegment.`set(ValueLayout.OfDoublePREVIEW layout, long offset, double value)`
Writes a double into this segment at the given offset, with the given layout.
`default void`
MemorySegment.`setAtIndex(ValueLayout.OfDoublePREVIEW layout, long index, double value)`
Writes a double into this segment at the given index, scaled by the given layout size.
`double[]`
MemorySegment.`toArray(ValueLayout.OfDoublePREVIEW elementLayout)`
Copy the contents of this memory segment into a new double array.