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, Danny Coward, Stepan Kopriva
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPrimitiveDecoders.BooleanDecoderstatic classPrimitiveDecoders.ByteDecoderstatic classPrimitiveDecoders.CharacterDecoderstatic classPrimitiveDecoders.DoubleDecoderstatic classPrimitiveDecoders.FloatDecoderstatic classPrimitiveDecoders.IntegerDecoderstatic classPrimitiveDecoders.LongDecoderstatic classPrimitiveDecoders.ShortDecoder-
Nested classes/interfaces inherited from interface jakarta.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>>ALLstatic 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 booleanwillDecode(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 jakarta.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.TextAnswer whether the given String can be decoded into an object of type T.- Specified by:
willDecodein interfaceDecoder.Text<T>- Parameters:
s- the string being tested for decodability.- Returns:
- whether this decoder can decoded the supplied string.
-
-