Record Class Image
@Experimental
public record Image(URI uri, LinkRelation rel, @Nullable String msg, @Nullable MediaType type)
extends Record
This is a container for the data model used for constructing images.
- Since:
- 7.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.msg()Returns the value of themsgrecord component.rel()Returns the value of therelrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.uri()Returns the value of theurirecord component.
-
Constructor Details
-
Image
Creates an instance of aImagerecord class.- Parameters:
uri- the value for theurirecord componentrel- the value for therelrecord componentmsg- the value for themsgrecord componenttype- the value for thetyperecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
uri
Returns the value of theurirecord component.- Returns:
- the value of the
urirecord component
-
rel
Returns the value of therelrecord component.- Returns:
- the value of the
relrecord component
-
msg
Returns the value of themsgrecord component.- Returns:
- the value of the
msgrecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-