java.lang.Object
java.lang.Record
club.doki7.ffm.ptr.IntPtr
@ValueBasedCandidate
@UnsafeConstructor
public record IntPtr(@NotNull MemorySegment segment)
extends Record
implements IPointer, Iterable<Integer>
-
Constructor Summary
ConstructorsConstructorDescriptionIntPtr(@NotNull MemorySegment segment) Creates an instance of aIntPtrrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull IntPtrstatic @NotNull IntPtrstatic @NotNull IntPtrstatic @NotNull IntPtrstatic @NotNull IntPtrstatic @NotNull IntPtrallocate(@NotNull Arena arena, Collection<Integer> ints) static @NotNull IntPtrstatic @Nullable IntPtrchecked(@NotNull MemorySegment segment) static @NotNull IntPtrfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.iterator()@NotNull IntPtroffset(long offset) intread()intread(long index) @NotNull IntPtrreinterpret(long newSize) @NotNull MemorySegmentsegment()Returns the value of thesegmentrecord component.longsize()@NotNull IntPtrslice(long end) @NotNull IntPtrslice(long start, long end) final StringtoString()Returns a string representation of this record class.voidwrite(int value) voidwrite(int @NotNull [] array) voidwrite(long index, int value) voidwriteV(int value0, int @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
-
IntPtr
Creates an instance of aIntPtrrecord class.- Parameters:
segment- the value for thesegmentrecord component
-
-
Method Details
-
size
public long size() -
read
public int read() -
write
public void write(int value) -
read
public int read(long index) -
write
public void write(long index, int value) -
write
public void write(int @NotNull [] array) -
writeV
public void writeV(int value0, int @NotNull ... values) -
reinterpret
-
offset
-
slice
-
slice
-
iterator
-
checked
-
checked
-
allocate
-
allocate
-
allocate
-
allocate
@NotNull public static @NotNull IntPtr allocate(@NotNull @NotNull Arena arena, Collection<Integer> ints) -
allocateV
-
allocate
-
allocate
-
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.
-