java.lang.Object
java.lang.Record
club.doki7.ffm.ptr.ShortPtr
@ValueBasedCandidate
@UnsafeConstructor
public record ShortPtr(@NotNull MemorySegment segment)
extends Record
implements IPointer, Iterable<Short>
-
Constructor Summary
ConstructorsConstructorDescriptionShortPtr(@NotNull MemorySegment segment) Creates an instance of aShortPtrrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull ShortPtrstatic @NotNull ShortPtrstatic @NotNull ShortPtrstatic @NotNull ShortPtrallocate(@NotNull Arena arena, @NotNull ShortBuffer buffer) static @NotNull ShortPtrallocate(@NotNull Arena arena, Collection<Short> shorts) static @NotNull ShortPtrstatic @Nullable ShortPtrchecked(@NotNull MemorySegment segment) static @NotNull ShortPtrchecked(@NotNull ShortBuffer buffer) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.iterator()@NotNull ShortPtroffset(long offset) shortread()shortread(long index) @NotNull ShortPtrreinterpret(long newSize) @NotNull MemorySegmentsegment()Returns the value of thesegmentrecord component.longsize()@NotNull ShortPtrslice(long end) @NotNull ShortPtrslice(long start, long end) final StringtoString()Returns a string representation of this record class.voidwrite(long index, short value) voidwrite(short value) voidwrite(short @NotNull [] values) voidwriteV(short value0, short @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
-
ShortPtr
Creates an instance of aShortPtrrecord class.- Parameters:
segment- the value for thesegmentrecord component
-
-
Method Details
-
size
public long size() -
read
public short read() -
write
public void write(short value) -
read
public short read(long index) -
write
public void write(long index, short value) -
write
public void write(short @NotNull [] values) -
writeV
public void writeV(short value0, short @NotNull ... values) -
reinterpret
-
offset
-
slice
-
slice
-
iterator
-
checked
-
checked
-
allocate
-
allocate
-
allocate
-
allocate
@NotNull public static @NotNull ShortPtr allocate(@NotNull @NotNull Arena arena, Collection<Short> shorts) -
allocateV
-
allocate
@NotNull public static @NotNull ShortPtr allocate(@NotNull @NotNull Arena arena, @NotNull @NotNull ShortBuffer 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.
-