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 StringThe name of the attribute that contains the image's format, e.g.static final StringThe name of the attribute that contains the image's height.static final StringThe name of the attribute that contains the image's byte array lengthstatic final ResourceTypestatic final StringThe 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 aImageResourcerecord class. -
Method Summary
Modifier and TypeMethodDescriptiondata()Returns the value of thedatarecord component.Returns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.format()Returns the value of theformatrecord component.final inthashCode()Returns a hash code value for this object.intheight()Returns the value of theheightrecord component.path()Returns the value of thepathrecord component.intsize()Returns the value of thesizerecord component.final StringtoString()Returns a string representation of this record class.intwidth()Returns the value of thewidthrecord 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 aImageResourcerecord class.- Parameters:
path- the value for thepathrecord componentdata- the value for thedatarecord componentformat- the value for theformatrecord componentdescription- the value for thedescriptionrecord componentwidth- the value for thewidthrecord componentheight- the value for theheightrecord componentsize- the value for thesizerecord 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 thepathrecord component.- Returns:
- the value of the
pathrecord component
-
data
Returns the value of thedatarecord component.- Returns:
- the value of the
datarecord component
-
format
Returns the value of theformatrecord component.- Returns:
- the value of the
formatrecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
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
-
size
public int size()Returns the value of thesizerecord component.- Returns:
- the value of the
sizerecord component
-