java.lang.Object
java.lang.Record
club.doki7.ffm.ptr.PointerPtr
- All Implemented Interfaces:
IPointer,Iterable<MemorySegment>
@ValueBasedCandidate
@UnsafeConstructor
public record PointerPtr(@NotNull MemorySegment segment)
extends Record
implements IPointer, Iterable<MemorySegment>
-
Constructor Summary
ConstructorsConstructorDescriptionPointerPtr(@NotNull MemorySegment segment) Creates an instance of aPointerPtrrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull PointerPtrstatic @NotNull PointerPtrstatic @NotNull PointerPtrallocate(@NotNull Arena arena, Collection<@Nullable IPointer> pointers) static @NotNull PointerPtrallocateR(@NotNull Arena arena, Collection<@NotNull MemorySegment> segments) static @NotNull PointerPtrallocateStrings(@NotNull Arena arena, @Nullable String @NotNull [] strings) static @NotNull PointerPtrallocateStrings(@NotNull Arena arena, @Nullable String string0, @Nullable String @NotNull ... strings) static @NotNull PointerPtrallocateStrings(@NotNull Arena arena, @NotNull Collection<@Nullable String> strings) static @NotNull PointerPtrstatic @NotNull PointerPtrallocateV(@NotNull Arena arena, @NotNull MemorySegment segment0, @NotNull MemorySegment... segments) static @Nullable PointerPtrchecked(@NotNull MemorySegment segment) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull Iterator<MemorySegment> iterator()@NotNull PointerPtroffset(long offset) @NotNull MemorySegmentread()@NotNull MemorySegmentread(long index) @NotNull PointerPtrreinterpret(long newSize) @NotNull MemorySegmentsegment()Returns the value of thesegmentrecord component.longsize()@NotNull PointerPtrslice(long end) @NotNull PointerPtrslice(long start, long end) final StringtoString()Returns a string representation of this record class.voidvoidwrite(long index, @NotNull MemorySegment value) voidvoidwrite(@NotNull MemorySegment value) 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
-
PointerPtr
Creates an instance of aPointerPtrrecord class.- Parameters:
segment- the value for thesegmentrecord component
-
-
Method Details
-
size
public long size() -
read
-
write
-
write
-
read
-
write
-
write
-
reinterpret
-
offset
-
slice
-
slice
-
iterator
- Specified by:
iteratorin interfaceIterable<MemorySegment>
-
checked
-
allocate
-
allocate
-
allocate
@NotNull public static @NotNull PointerPtr allocate(@NotNull @NotNull Arena arena, Collection<@Nullable IPointer> pointers) -
allocateR
@NotNull public static @NotNull PointerPtr allocateR(@NotNull @NotNull Arena arena, Collection<@NotNull MemorySegment> segments) -
allocateV
@NotNull public static @NotNull PointerPtr allocateV(@NotNull @NotNull Arena arena, @Nullable @Nullable IPointer pointer0, @Nullable @Nullable IPointer... pointers) -
allocateV
@NotNull public static @NotNull PointerPtr allocateV(@NotNull @NotNull Arena arena, @NotNull @NotNull MemorySegment segment0, @NotNull @NotNull MemorySegment... segments) -
allocateStrings
@NotNull public static @NotNull PointerPtr allocateStrings(@NotNull @NotNull Arena arena, @Nullable @Nullable String string0, @Nullable @Nullable String @NotNull ... strings) -
allocateStrings
@NotNull public static @NotNull PointerPtr allocateStrings(@NotNull @NotNull Arena arena, @Nullable @Nullable String @NotNull [] strings) -
allocateStrings
@NotNull public static @NotNull PointerPtr allocateStrings(@NotNull @NotNull Arena arena, @NotNull @NotNull Collection<@Nullable String> strings) -
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.
-