Top Description Fields Constructors Methods
org.eclipse.jetty.ee10.websocket.jakarta.common.decoders

public Class FloatDecoder

extends AbstractDecoder
implements Decoder.Text<Float>
Class Inheritance
All Implemented Interfaces
jakarta.websocket.Decoder.Text, jakarta.websocket.Decoder
Imports
jakarta.websocket.DecodeException, .Decoder

Default implementation of the Text Message to Float decoder

Field Summary

Modifier and TypeField and Description
public static final FloatDecoder

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Float
decode(String
string to be decoded.
s
)

Implements jakarta.websocket.Decoder.Text.decode.

Decode the given String into an object of type T.

public boolean
willDecode(String
the string being tested for decodability.
s
)

Implements jakarta.websocket.Decoder.Text.willDecode.

Answer whether the given String can be decoded into an object of type T.

Inherited from org.eclipse.jetty.ee10.websocket.jakarta.common.decoders.AbstractDecoder:
destroyinit

Field Detail

INSTANCEback to summary
public static final FloatDecoder INSTANCE

Constructor Detail

FloatDecoderback to summary
public FloatDecoder()

Method Detail

decodeback to summary
public Float decode(String s) throws DecodeException

Implements jakarta.websocket.Decoder.Text.decode.

Doc from jakarta.websocket.Decoder.Text.decode.

Decode the given String into an object of type T.

Parameters
s:String

string to be decoded.

Returns:Float

the decoded message as an object of type T

Annotations
@Override
Exceptions
DecodeException:
If the provided string cannot be decoded to type T
willDecodeback to summary
public boolean willDecode(String s)

Implements jakarta.websocket.Decoder.Text.willDecode.

Doc from jakarta.websocket.Decoder.Text.willDecode.

Answer whether the given String can be decoded into an object of type T.

Parameters
s:String

the string being tested for decodability.

Returns:boolean

whether this decoder can decoded the supplied string.

Annotations
@Override