java.lang.Object
java.lang.Record
club.doki7.ffm.ptr.FloatPtr
@ValueBasedCandidate
@UnsafeConstructor
public record FloatPtr(@NotNull MemorySegment segment)
extends Record
implements IPointer, Iterable<Float>
-
Constructor Summary
ConstructorsConstructorDescriptionFloatPtr(@NotNull MemorySegment segment) Creates an instance of aFloatPtrrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull FloatPtrstatic @NotNull FloatPtrstatic @NotNull FloatPtrstatic @NotNull FloatPtrallocate(@NotNull Arena arena, @NotNull FloatBuffer buffer) static @NotNull FloatPtrallocate(@NotNull Arena arena, Collection<Float> floats) static @NotNull FloatPtrstatic @Nullable FloatPtrchecked(@NotNull MemorySegment segment) static @NotNull FloatPtrchecked(@NotNull FloatBuffer buffer) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.iterator()@NotNull FloatPtroffset(long offset) floatread()floatread(long index) @NotNull FloatPtrreinterpret(long newSize) @NotNull MemorySegmentsegment()Returns the value of thesegmentrecord component.longsize()@NotNull FloatPtrslice(long end) @NotNull FloatPtrslice(long start, long end) final StringtoString()Returns a string representation of this record class.voidwrite(float value) voidwrite(float @NotNull [] array) voidwrite(long index, float value) voidwriteV(float value0, float @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
-
FloatPtr
Creates an instance of aFloatPtrrecord class.- Parameters:
segment- the value for thesegmentrecord component
-
-
Method Details
-
size
public long size() -
read
public float read() -
write
public void write(float value) -
read
public float read(long index) -
write
public void write(long index, float value) -
write
public void write(float @NotNull [] array) -
writeV
public void writeV(float value0, float @NotNull ... values) -
reinterpret
-
offset
-
slice
-
slice
-
iterator
-
checked
-
checked
-
allocate
-
allocate
-
allocate
-
allocate
@NotNull public static @NotNull FloatPtr allocate(@NotNull @NotNull Arena arena, Collection<Float> floats) -
allocateV
-
allocate
@NotNull public static @NotNull FloatPtr allocate(@NotNull @NotNull Arena arena, @NotNull @NotNull FloatBuffer 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.
-