Record Class ImageData
java.lang.Object
java.lang.Record
dev.engine.core.asset.ImageData
-
Constructor Summary
ConstructorsConstructorDescriptionImageData(int width, int height, int channels, ByteBuffer pixels) Creates an instance of aImageDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionintchannels()Returns the value of thechannelsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intheight()Returns the value of theheightrecord component.pixels()Returns the value of thepixelsrecord component.final StringtoString()Returns a string representation of this record class.intwidth()Returns the value of thewidthrecord component.
-
Constructor Details
-
ImageData
Creates an instance of aImageDatarecord class.- Parameters:
width- the value for thewidthrecord componentheight- the value for theheightrecord componentchannels- the value for thechannelsrecord componentpixels- the value for thepixelsrecord component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
width
public int width()Returns the value of thewidthrecord component.- Returns:
- the value of the
widthrecord component
-
height
public int height()Returns the value of theheightrecord component.- Returns:
- the value of the
heightrecord component
-
channels
public int channels()Returns the value of thechannelsrecord component.- Returns:
- the value of the
channelsrecord component
-
pixels
Returns the value of thepixelsrecord component.- Returns:
- the value of the
pixelsrecord component
-