Package org.glassfish.tyrus.core.coder
Class PrimitiveDecoders<T>
- java.lang.Object
-
- org.glassfish.tyrus.core.coder.CoderAdapter
-
- org.glassfish.tyrus.core.coder.PrimitiveDecoders<T>
-
- All Implemented Interfaces:
Decoder
,Decoder.Text<T>
- Direct Known Subclasses:
PrimitiveDecoders.BooleanDecoder
,PrimitiveDecoders.ByteDecoder
,PrimitiveDecoders.CharacterDecoder
,PrimitiveDecoders.DoubleDecoder
,PrimitiveDecoders.FloatDecoder
,PrimitiveDecoders.IntegerDecoder
,PrimitiveDecoders.LongDecoder
,PrimitiveDecoders.ShortDecoder
public abstract class PrimitiveDecoders<T> extends CoderAdapter implements Decoder.Text<T>
Collection of decoders for all primitive types.- Author:
- Martin Matula (martin.matula at oracle.com), Danny Coward (danny.coward at oracle.com), Stepan Kopriva (stepan.kopriva at oracle.com)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PrimitiveDecoders.BooleanDecoder
static class
PrimitiveDecoders.ByteDecoder
static class
PrimitiveDecoders.CharacterDecoder
static class
PrimitiveDecoders.DoubleDecoder
static class
PrimitiveDecoders.FloatDecoder
static class
PrimitiveDecoders.IntegerDecoder
static class
PrimitiveDecoders.LongDecoder
static class
PrimitiveDecoders.ShortDecoder
-
Nested classes/interfaces inherited from interface javax.websocket.Decoder
Decoder.Binary<T>, Decoder.BinaryStream<T>, Decoder.Text<T>, Decoder.TextStream<T>
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.List<java.lang.Class<? extends Decoder>>
ALL
static java.util.Map<java.lang.Class<?>,Decoder.Text<?>>
ALL_INSTANCES
-
Constructor Summary
Constructors Constructor Description PrimitiveDecoders()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
willDecode(java.lang.String s)
Answer whether the given String can be decoded into an object of type T.-
Methods inherited from class org.glassfish.tyrus.core.coder.CoderAdapter
destroy, init
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface javax.websocket.Decoder.Text
decode
-
-
-
-
Field Detail
-
ALL
public static final java.util.List<java.lang.Class<? extends Decoder>> ALL
-
ALL_INSTANCES
public static final java.util.Map<java.lang.Class<?>,Decoder.Text<?>> ALL_INSTANCES
-
-
Method Detail
-
willDecode
public boolean willDecode(java.lang.String s)
Description copied from interface:Decoder.Text
Answer whether the given String can be decoded into an object of type T.- Specified by:
willDecode
in interfaceDecoder.Text<T>
- Parameters:
s
- the string being tested for decodability.- Returns:
- whether this decoder can decoded the supplied string.
-
-