public static class Tuple.DefaultTupleFormatter extends Object implements Tuple.TupleFormatter
Timestamp.toString()
streambase.tuple-charset
system property)Tuple.NULL_STRING
A shared instance is available at Tuple.getTupleFormatter()
.
Constructor and Description |
---|
DefaultTupleFormatter()
See the class documentation for
Tuple.DefaultTupleFormatter for details |
Modifier and Type | Method and Description |
---|---|
CharSequence |
formatBlob(ByteArrayView blob)
Return a string representation of the given StreamBase blob value
|
CharSequence |
formatBool(Boolean b)
Return a string representation of the given StreamBase boolean value
|
CharSequence |
formatDouble(Double d)
Return a string representation of the given StreamBase double value
|
CharSequence |
formatFunction(Function f)
Return a string representation of the given StreamBase function
|
CharSequence |
formatInt(Integer i)
Return a string representation of the given StreamBase integer value
|
CharSequence |
formatList(CompleteDataType elementType,
List<?> l)
Return a string representation of the given StreamBase list
|
CharSequence |
formatLong(Long l)
Return a string representation of the given StreamBase long value
|
CharSequence |
formatString(String s)
Return a string representation of the given StreamBase string value
|
CharSequence |
formatTimestamp(Timestamp t)
Return a string representation of the given StreamBase timestamp value
|
CharSequence |
formatTuple(Tuple t)
Return a string representation of the given StreamBase Tuple value
|
protected String |
getNullString()
This value will be returned by this formatter when any null field value
is asked to be formatted.
|
public DefaultTupleFormatter()
Tuple.DefaultTupleFormatter
for detailsprotected String getNullString()
Tuple.NULL_STRING
public CharSequence formatBlob(ByteArrayView blob)
Tuple.TupleFormatter
formatBlob
in interface Tuple.TupleFormatter
blob
- may be nullpublic CharSequence formatTimestamp(Timestamp t)
Tuple.TupleFormatter
formatTimestamp
in interface Tuple.TupleFormatter
t
- may be nullpublic CharSequence formatString(String s)
Tuple.TupleFormatter
formatString
in interface Tuple.TupleFormatter
s
- may be nullpublic CharSequence formatInt(Integer i)
Tuple.TupleFormatter
formatInt
in interface Tuple.TupleFormatter
i
- may be nullpublic CharSequence formatDouble(Double d)
Tuple.TupleFormatter
formatDouble
in interface Tuple.TupleFormatter
d
- may be nullpublic CharSequence formatLong(Long l)
Tuple.TupleFormatter
formatLong
in interface Tuple.TupleFormatter
l
- may be nullpublic CharSequence formatBool(Boolean b)
Tuple.TupleFormatter
formatBool
in interface Tuple.TupleFormatter
b
- may be nullpublic CharSequence formatTuple(Tuple t)
Tuple.TupleFormatter
formatTuple
in interface Tuple.TupleFormatter
t
- may be nullpublic CharSequence formatList(CompleteDataType elementType, List<?> l)
Tuple.TupleFormatter
formatList
in interface Tuple.TupleFormatter
elementType
- the data type of all list elementsl
- may be nullpublic CharSequence formatFunction(Function f)
Tuple.TupleFormatter
formatFunction
in interface Tuple.TupleFormatter
f
- may be null