Record Class MindustryCanvas
java.lang.Object
java.lang.Record
com.xpdustry.nohorny.common.MindustryCanvas
- All Implemented Interfaces:
MindustryImage
public record MindustryCanvas(int resolution, ImmutableIntArray palette, ImmutableByteArray pixels, @Nullable MindustryAuthor author)
extends Record
implements MindustryImage
-
Constructor Summary
ConstructorsConstructorDescriptionMindustryCanvas(int resolution, ImmutableIntArray palette, ImmutableByteArray pixels, @Nullable MindustryAuthor author) Creates an instance of aMindustryCanvasrecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable MindustryAuthorauthor()Returns the value of theauthorrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.palette()Returns the value of thepaletterecord component.pixels()Returns the value of thepixelsrecord component.intReturns the value of theresolutionrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
MindustryCanvas
public MindustryCanvas(int resolution, ImmutableIntArray palette, ImmutableByteArray pixels, @Nullable MindustryAuthor author) Creates an instance of aMindustryCanvasrecord class.- Parameters:
resolution- the value for theresolutionrecord componentpalette- the value for thepaletterecord componentpixels- the value for thepixelsrecord componentauthor- the value for theauthorrecord 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. -
resolution
public int resolution()Returns the value of theresolutionrecord component.- Specified by:
resolutionin interfaceMindustryImage- Returns:
- the value of the
resolutionrecord component
-
palette
Returns the value of thepaletterecord component.- Returns:
- the value of the
paletterecord component
-
pixels
Returns the value of thepixelsrecord component.- Returns:
- the value of the
pixelsrecord component
-
author
Returns the value of theauthorrecord component.- Returns:
- the value of the
authorrecord component
-