org.glassfish.tyrus
Class PrimitiveDecoders<T>

java.lang.Object
  extended by org.glassfish.tyrus.PrimitiveDecoders<T>
All Implemented Interfaces:
Decoder, Decoder.Text<T>

public abstract class PrimitiveDecoders<T>
extends Object
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)

Nested Class Summary
 
Nested classes/interfaces inherited from interface javax.websocket.Decoder
Decoder.Binary<T>, Decoder.BinaryStream<T>, Decoder.Text<T>, Decoder.TextStream<T>
 
Field Summary
static List<Decoder.Text<?>> ALL
           
static List<DecoderWrapper> ALL_WRAPPED
           
 
Constructor Summary
PrimitiveDecoders()
           
 
Method Summary
 boolean willDecode(String s)
          Answer whether the given String can be decoded into an object of type T.
 
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 List<Decoder.Text<?>> ALL

ALL_WRAPPED

public static final List<DecoderWrapper> ALL_WRAPPED
Constructor Detail

PrimitiveDecoders

public PrimitiveDecoders()
Method Detail

willDecode

public boolean willDecode(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 interface Decoder.Text<T>
Parameters:
s - the string being tested for decodability
Returns:
whether this decoder can decoded the supplied string.


Copyright © 2012. All Rights Reserved.