Uses of Interface
java.lang.foreign.ValueLayout.OfDouble
Package
Description
Provides low-level access to memory and functions outside the Java runtime.
-
Uses of ValueLayout.OfDouble in java.lang.foreign
Modifier and TypeFieldDescriptionstatic final ValueLayout.OfDouble
ValueLayout.JAVA_DOUBLE
A value layout constant whose size is the same as that of a Javadouble
, byte alignment set to 8, and byte order set toByteOrder.nativeOrder()
.static final ValueLayout.OfDouble
ValueLayout.JAVA_DOUBLE_UNALIGNED
An unaligned value layout constant whose size is the same as that of a Javadouble
and byte order set toByteOrder.nativeOrder()
.Modifier and TypeMethodDescriptionValueLayout.OfDouble.withByteAlignment
(long byteAlignment) Returns a memory layout with the same characteristics as this layout, but with the given alignment constraint (in bytes).Returns a memory layout with the same characteristics as this layout, but with the given name.Returns a value layout with the same characteristics as this layout, but with the given byte order.ValueLayout.OfDouble.withoutName()
Returns a memory layout with the same characteristics as this layout, but with no name.Modifier and TypeMethodDescriptiondefault MemorySegment
SegmentAllocator.allocateFrom
(ValueLayout.OfDouble layout, double value) Returns a new memory segment initialized with the provided double value.default MemorySegment
SegmentAllocator.allocateFrom
(ValueLayout.OfDouble elementLayout, double... elements) Returns a new memory segment initialized with the elements in the provided double array.double
MemorySegment.get
(ValueLayout.OfDouble layout, long offset) Reads a double from this segment at the given offset, with the given layout.double
MemorySegment.getAtIndex
(ValueLayout.OfDouble layout, long index) Reads a double from this segment at the given index, scaled by the given layout size.void
MemorySegment.set
(ValueLayout.OfDouble layout, long offset, double value) Writes a double into this segment at the given offset, with the given layout.void
MemorySegment.setAtIndex
(ValueLayout.OfDouble 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.OfDouble elementLayout) Copy the contents of this memory segment into a new double array.