public abstract class EcsvDecoder<T>
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
protected |
EcsvDecoder(java.lang.Class<T> clazz,
java.lang.String datatype)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
abstract T |
decode(java.lang.String txt)
Attempts to decode the supplied string to a value of this decoder's
type.
|
static EcsvDecoder<?> |
forDatatype(java.lang.String txt)
Returns an instance of this class given a datatype name.
|
java.lang.Class<T> |
getContentClass()
Returns the class to which input values will be decoded.
|
java.lang.String |
getDatatype()
Returns the declared name for this decoder.
|
protected EcsvDecoder(java.lang.Class<T> clazz, java.lang.String datatype)
clazz
- destination classdatatype
- datatype string declared in ECSV filepublic abstract T decode(java.lang.String txt)
txt
- non-blank string to decodejava.lang.NumberFormatException
- in case of unrecognised stringpublic java.lang.Class<T> getContentClass()
public java.lang.String getDatatype()
public static EcsvDecoder<?> forDatatype(java.lang.String txt)
txt
- case-sensitive datatype name