public class BooleanDecoder extends AbstractDecoder implements javax.websocket.Decoder.Text<java.lang.Boolean>
Decoder.Text
Message to Boolean
decoder.
Note: delegates to Boolean.parseBoolean(String)
and will only support "true" and "false" as boolean values.
Modifier and Type | Field and Description |
---|---|
static BooleanDecoder |
INSTANCE |
Constructor and Description |
---|
BooleanDecoder() |
Modifier and Type | Method and Description |
---|---|
java.lang.Boolean |
decode(java.lang.String s) |
boolean |
willDecode(java.lang.String s) |
destroy, init
public static final BooleanDecoder INSTANCE
public java.lang.Boolean decode(java.lang.String s) throws javax.websocket.DecodeException
decode
in interface javax.websocket.Decoder.Text<java.lang.Boolean>
javax.websocket.DecodeException
public boolean willDecode(java.lang.String s)
willDecode
in interface javax.websocket.Decoder.Text<java.lang.Boolean>
Copyright © 1995–2023 Webtide. All rights reserved.