java.lang.Object
java.lang.Record
club.doki7.ffm.ptr.LongPtr
@ValueBasedCandidate
@UnsafeConstructor
public record LongPtr(@NotNull MemorySegment segment)
extends Record
implements IPointer, Iterable<Long>
-
Constructor Summary
ConstructorsConstructorDescriptionLongPtr(@NotNull MemorySegment segment) Creates an instance of aLongPtrrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull LongPtrstatic @NotNull LongPtrstatic @NotNull LongPtrstatic @NotNull LongPtrallocate(@NotNull Arena arena, @NotNull LongBuffer buffer) static @NotNull LongPtrallocate(@NotNull Arena arena, Collection<Long> longs) static @NotNull LongPtrstatic @Nullable LongPtrchecked(@NotNull MemorySegment segment) static @NotNull LongPtrchecked(@NotNull LongBuffer buffer) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.iterator()@NotNull LongPtroffset(long offset) longread()longread(long index) @NotNull LongPtrreinterpret(long newSize) @NotNull MemorySegmentsegment()Returns the value of thesegmentrecord component.longsize()@NotNull LongPtrslice(long end) @NotNull LongPtrslice(long start, long end) final StringtoString()Returns a string representation of this record class.voidwrite(long value) voidwrite(long @NotNull [] array) voidwrite(long index, long value) voidwriteV(long value0, long @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
-
LongPtr
Creates an instance of aLongPtrrecord class.- Parameters:
segment- the value for thesegmentrecord component
-
-
Method Details
-
size
public long size() -
read
public long read() -
write
public void write(long value) -
read
public long read(long index) -
write
public void write(long index, long value) -
write
public void write(long @NotNull [] array) -
writeV
public void writeV(long value0, long @NotNull ... values) -
reinterpret
-
offset
-
slice
-
slice
-
iterator
-
checked
-
checked
-
allocate
-
allocate
-
allocate
-
allocate
@NotNull public static @NotNull LongPtr allocate(@NotNull @NotNull Arena arena, Collection<Long> longs) -
allocateV
-
allocate
@NotNull public static @NotNull LongPtr allocate(@NotNull @NotNull Arena arena, @NotNull @NotNull LongBuffer 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.
-