Module io.helidon.http.media
Package io.helidon.http.media
Record Class MediaSupport.WriterResponse<T>
java.lang.Object
java.lang.Record
io.helidon.http.media.MediaSupport.WriterResponse<T>
- Type Parameters:
T- type of entity- Record Components:
support- how is the response supportedsupplier- entity writer supplier, may be null ifMediaSupport.SupportLevel.NOT_SUPPORTED
- Enclosing interface:
MediaSupport
public static record MediaSupport.WriterResponse<T>(MediaSupport.SupportLevel support, Supplier<EntityWriter<T>> supplier)
extends Record
Writer response.
-
Constructor Summary
ConstructorsConstructorDescriptionWriterResponse(MediaSupport.SupportLevel support, Supplier<EntityWriter<T>> supplier) Creates an instance of aWriterResponserecord class. -
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.supplier()Returns the value of thesupplierrecord component.support()Returns the value of thesupportrecord component.final StringtoString()Returns a string representation of this record class.static <T> MediaSupport.WriterResponse<T> Unsupported writer response.
-
Constructor Details
-
Method Details
-
unsupported
Unsupported writer response.- Type Parameters:
T- type of entity- Returns:
- unsupported response (constant)
-
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). -
support
Returns the value of thesupportrecord component.- Returns:
- the value of the
supportrecord component
-
supplier
Returns the value of thesupplierrecord component.- Returns:
- the value of the
supplierrecord component
-