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
ConstructorDescriptionWriterResponse
(MediaSupport.SupportLevel support, Supplier<EntityWriter<T>> supplier) Creates an instance of aWriterResponse
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.supplier()
Returns the value of thesupplier
record component.support()
Returns the value of thesupport
record component.final String
toString()
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 thesupport
record component.- Returns:
- the value of the
support
record component
-
supplier
Returns the value of thesupplier
record component.- Returns:
- the value of the
supplier
record component
-