Record Class ImageResource
java.lang.Object
java.lang.Record
com.inductiveautomation.ignition.gateway.images.ImageResource
public record ImageResource(ResourcePath path, ImmutableBytes data, ImageFormat format, String description, int width, int height, int size)
extends Record
Record type that represents an image resource.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
The name of the attribute that contains the image's format, e.g.static final String
The name of the attribute that contains the image's height.static final String
The name of the attribute that contains the image's byte array lengthstatic final ResourceType
static final String
The name of the attribute that contains the image's width. -
Constructor Summary
ConstructorsConstructorDescriptionImageResource
(ResourcePath path, ImmutableBytes data, ImageFormat format, String description, int width, int height, int size) Creates an instance of aImageResource
record class. -
Method Summary
Modifier and TypeMethodDescriptiondata()
Returns the value of thedata
record component.Returns the value of thedescription
record component.final boolean
Indicates whether some other object is "equal to" this one.format()
Returns the value of theformat
record component.final int
hashCode()
Returns a hash code value for this object.int
height()
Returns the value of theheight
record component.path()
Returns the value of thepath
record component.int
size()
Returns the value of thesize
record component.final String
toString()
Returns a string representation of this record class.int
width()
Returns the value of thewidth
record component.
-
Field Details
-
TYPE
-
WIDTH_ATTRIBUTE
The name of the attribute that contains the image's width.- See Also:
-
HEIGHT_ATTRIBUTE
The name of the attribute that contains the image's height.- See Also:
-
SIZE_ATTRIBUTE
The name of the attribute that contains the image's byte array length- See Also:
-
FORMAT_ATTRIBUTE
The name of the attribute that contains the image's format, e.g. "PNG", "JPEG", etc.- See Also:
-
-
Constructor Details
-
ImageResource
public ImageResource(ResourcePath path, ImmutableBytes data, ImageFormat format, String description, int width, int height, int size) Creates an instance of aImageResource
record class.- Parameters:
path
- the value for thepath
record componentdata
- the value for thedata
record componentformat
- the value for theformat
record componentdescription
- the value for thedescription
record componentwidth
- the value for thewidth
record componentheight
- the value for theheight
record componentsize
- the value for thesize
record component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 '=='. -
path
Returns the value of thepath
record component.- Returns:
- the value of the
path
record component
-
data
Returns the value of thedata
record component.- Returns:
- the value of the
data
record component
-
format
Returns the value of theformat
record component.- Returns:
- the value of the
format
record component
-
description
Returns the value of thedescription
record component.- Returns:
- the value of the
description
record component
-
width
public int width()Returns the value of thewidth
record component.- Returns:
- the value of the
width
record component
-
height
public int height()Returns the value of theheight
record component.- Returns:
- the value of the
height
record component
-
size
public int size()Returns the value of thesize
record component.- Returns:
- the value of the
size
record component
-