java.lang.Object
java.lang.Record
club.doki7.ffm.ptr.DoublePtr
@ValueBasedCandidate
@UnsafeConstructor
public record DoublePtr(@NotNull MemorySegment segment)
extends Record
implements IPointer, Iterable<Double>
-
Constructor Summary
ConstructorsConstructorDescriptionDoublePtr(@NotNull MemorySegment segment) Creates an instance of aDoublePtrrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull DoublePtrstatic @NotNull DoublePtrstatic @NotNull DoublePtrstatic @NotNull DoublePtrallocate(@NotNull Arena arena, @NotNull DoubleBuffer buffer) static @NotNull DoublePtrallocate(@NotNull Arena arena, Collection<Double> doubles) static @NotNull DoublePtrstatic @Nullable DoublePtrchecked(@NotNull MemorySegment segment) static @NotNull DoublePtrchecked(@NotNull DoubleBuffer buffer) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.iterator()@NotNull DoublePtroffset(long offset) doubleread()doubleread(long index) @NotNull DoublePtrreinterpret(long newSize) @NotNull MemorySegmentsegment()Returns the value of thesegmentrecord component.longsize()@NotNull DoublePtrslice(long end) @NotNull DoublePtrslice(long start, long end) final StringtoString()Returns a string representation of this record class.voidwrite(double value) voidwrite(double @NotNull [] array) voidwrite(long index, double value) voidwriteV(double value0, double @NotNull ... values) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
DoublePtr
Creates an instance of aDoublePtrrecord class.- Parameters:
segment- the value for thesegmentrecord component
-
-
Method Details
-
size
public long size() -
read
public double read() -
write
public void write(double value) -
read
public double read(long index) -
write
public void write(long index, double value) -
write
public void write(double @NotNull [] array) -
writeV
public void writeV(double value0, double @NotNull ... values) -
reinterpret
-
offset
-
slice
-
slice
-
checked
-
iterator
-
checked
-
allocate
-
allocate
-
allocate
-
allocate
@NotNull public static @NotNull DoublePtr allocate(@NotNull @NotNull Arena arena, Collection<Double> doubles) -
allocateV
-
allocate
@NotNull public static @NotNull DoublePtr allocate(@NotNull @NotNull Arena arena, @NotNull @NotNull DoubleBuffer buffer) -
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
segment
Returns the value of thesegmentrecord component.
-