Record Class GpuBufferSlice.MappedView
java.lang.Object
java.lang.Record
com.mojang.blaze3d.buffers.GpuBufferSlice.MappedView
- All Implemented Interfaces:
AutoCloseable
- Enclosing class:
GpuBufferSlice
public static record GpuBufferSlice.MappedView(GpuBufferSlice slice, ByteBuffer data, Runnable onClose)
extends Record
implements AutoCloseable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ByteBufferThe field for thedatarecord component.private final RunnableThe field for theonCloserecord component.private final GpuBufferSliceThe field for theslicerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionMappedView(GpuBufferSlice slice, ByteBuffer data, Runnable onClose) Creates an instance of aMappedViewrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()data()Returns the value of thedatarecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.onClose()Returns the value of theonCloserecord component.slice()Returns the value of theslicerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
slice
The field for theslicerecord component. -
data
The field for thedatarecord component. -
onClose
The field for theonCloserecord component.
-
-
Constructor Details
-
MappedView
Creates an instance of aMappedViewrecord class.- Parameters:
slice- the value for theslicerecord componentdata- the value for thedatarecord componentonClose- the value for theonCloserecord component
-
-
Method Details
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
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). -
slice
Returns the value of theslicerecord component.- Returns:
- the value of the
slicerecord component
-
data
Returns the value of thedatarecord component.- Returns:
- the value of the
datarecord component
-
onClose
Returns the value of theonCloserecord component.- Returns:
- the value of the
onCloserecord component
-