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

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

- ## Uses of ValueLayout.OfLongPREVIEW in java.lang.foreign

  Fields in java.lang.foreign declared as ValueLayout.OfLongPREVIEW
  Modifier and Type
  Field
  Description
  `static final ValueLayout.OfLongPREVIEW`
  ValueLayout.`JAVA_LONG`
  A value layout constant whose size is the same as that of a Java `long`, bit alignment set to 64, and byte order set to `ByteOrder.nativeOrder()`.
  `static final ValueLayout.OfLongPREVIEW`
  ValueLayout.`JAVA_LONG_UNALIGNED`
  An unaligned value layout constant whose size is the same as that of a Java `long` and byte order set to `ByteOrder.nativeOrder()`.
  Methods in java.lang.foreign that return ValueLayout.OfLongPREVIEW
  Modifier and Type
  Method
  Description
  `ValueLayout.OfLongPREVIEW`
  ValueLayout.OfLong.`withBitAlignment(long bitAlignment)`
  Returns a memory layout of the same type with the same size and name as this layout, but with the specified alignment constraint (in bits).
  `ValueLayout.OfLongPREVIEW`
  ValueLayout.OfLong.`withName(String name)`
  Returns a memory layout of the same type with the same size and alignment constraint as this layout, but with the specified name.
  `ValueLayout.OfLongPREVIEW`
  ValueLayout.OfLong.`withOrder(ByteOrder order)`
  Returns a value layout with the same carrier, alignment constraint and name as this value layout, but with the specified byte order.
  Methods in java.lang.foreign with parameters of type ValueLayout.OfLongPREVIEW
  Modifier and Type
  Method
  Description
  `VaList.BuilderPREVIEW`
  VaList.Builder.`addVarg(ValueLayout.OfLongPREVIEW layout, long value)`
  Writes a `long` value to the variable argument list being constructed.
  `default MemorySegmentPREVIEW`
  SegmentAllocator.`allocate(ValueLayout.OfLongPREVIEW layout, long value)`
  Allocates a memory segment with the given layout and initializes it with the given long value.
  `default MemorySegmentPREVIEW`
  SegmentAllocator.`allocateArray(ValueLayout.OfLongPREVIEW elementLayout, long... elements)`
  Allocates a memory segment with the given layout and initializes it with the given long elements.
  `default long`
  MemorySegment.`get(ValueLayout.OfLongPREVIEW layout, long offset)`
  Reads a long from this segment at the given offset, with the given layout.
  `default long`
  MemorySegment.`getAtIndex(ValueLayout.OfLongPREVIEW layout, long index)`
  Reads a long from this segment at the given index, scaled by the given layout size.
  `long`
  VaList.`nextVarg(ValueLayout.OfLongPREVIEW layout)`
  Reads the next value as a `long` and advances this variable argument list's position.
  `default void`
  MemorySegment.`set(ValueLayout.OfLongPREVIEW layout, long offset, long value)`
  Writes a long into this segment at the given offset, with the given layout.
  `default void`
  MemorySegment.`setAtIndex(ValueLayout.OfLongPREVIEW layout, long index, long value)`
  Writes a long into this segment at the given index, scaled by the given layout size.
  `long[]`
  MemorySegment.`toArray(ValueLayout.OfLongPREVIEW elementLayout)`
  Copy the contents of this memory segment into a new long array.