Record Class ResourceLoadableTexture
java.lang.Object
java.lang.Record
dev.pfaff.altargui.texture.ResourceLoadableTexture
- All Implemented Interfaces:
LoadableTexture
public record ResourceLoadableTexture(LoadableResource resource)
extends Record
implements LoadableTexture
-
Constructor Summary
ConstructorsConstructorDescriptionResourceLoadableTexture
(LoadableResource resource) Creates an instance of aResourceLoadableTexture
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.load()
Loads the texture synchronously.resource()
Returns the value of theresource
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
ResourceLoadableTexture
Creates an instance of aResourceLoadableTexture
record class.- Parameters:
resource
- the value for theresource
record component
-
-
Method Details
-
load
Description copied from interface:LoadableTexture
Loads the texture synchronously. This is meant to be called from a worker thread, not the main thread.- Specified by:
load
in interfaceLoadableTexture
-
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)
. -
resource
Returns the value of theresource
record component.- Returns:
- the value of the
resource
record component
-