Module io.helidon.http.media
Package io.helidon.http.media
Record Class MediaSupport.ReaderResponse<T>
java.lang.Object
java.lang.Record
io.helidon.http.media.MediaSupport.ReaderResponse<T>
- Type Parameters:
T
- type of entity- Record Components:
support
- how is the response supportedsupplier
- entity reader supplier, may be null ifMediaSupport.SupportLevel.NOT_SUPPORTED
- Enclosing interface:
MediaSupport
public static record MediaSupport.ReaderResponse<T>(MediaSupport.SupportLevel support, Supplier<EntityReader<T>> supplier)
extends Record
Reader response.
-
Constructor Summary
ConstructorDescriptionReaderResponse
(MediaSupport.SupportLevel support, Supplier<EntityReader<T>> supplier) Creates an instance of aReaderResponse
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.ReaderResponse
<T> Unsupported reader response.
-
Constructor Details
-
Method Details
-
unsupported
Unsupported reader 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
-