public static class Tuple.DefaultTupleFormatter extends java.lang.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 |
---|---|
java.lang.CharSequence |
formatBlob(ByteArrayView blob)
Return a string representation of the given StreamBase blob value
|
java.lang.CharSequence |
formatBool(java.lang.Boolean b)
Return a string representation of the given StreamBase boolean value
|
java.lang.CharSequence |
formatDouble(java.lang.Double d)
Return a string representation of the given StreamBase double value
|
java.lang.CharSequence |
formatFunction(Function f)
Return a string representation of the given StreamBase function
|
java.lang.CharSequence |
formatInt(java.lang.Integer i)
Return a string representation of the given StreamBase integer value
|
java.lang.CharSequence |
formatList(CompleteDataType elementType,
java.util.List<?> l)
Return a string representation of the given StreamBase list
|
java.lang.CharSequence |
formatLong(java.lang.Long l)
Return a string representation of the given StreamBase long value
|
java.lang.CharSequence |
formatString(java.lang.String s)
Return a string representation of the given StreamBase string value
|
java.lang.CharSequence |
formatTimestamp(Timestamp t)
Return a string representation of the given StreamBase timestamp value
|
java.lang.CharSequence |
formatTuple(Tuple t)
Return a string representation of the given StreamBase Tuple value
|
protected java.lang.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 java.lang.String getNullString()
Tuple.NULL_STRING
public java.lang.CharSequence formatBlob(ByteArrayView blob)
Tuple.TupleFormatter
formatBlob
in interface Tuple.TupleFormatter
blob
- may be nullpublic java.lang.CharSequence formatTimestamp(Timestamp t)
Tuple.TupleFormatter
formatTimestamp
in interface Tuple.TupleFormatter
t
- may be nullpublic java.lang.CharSequence formatString(java.lang.String s)
Tuple.TupleFormatter
formatString
in interface Tuple.TupleFormatter
s
- may be nullpublic java.lang.CharSequence formatInt(java.lang.Integer i)
Tuple.TupleFormatter
formatInt
in interface Tuple.TupleFormatter
i
- may be nullpublic java.lang.CharSequence formatDouble(java.lang.Double d)
Tuple.TupleFormatter
formatDouble
in interface Tuple.TupleFormatter
d
- may be nullpublic java.lang.CharSequence formatLong(java.lang.Long l)
Tuple.TupleFormatter
formatLong
in interface Tuple.TupleFormatter
l
- may be nullpublic java.lang.CharSequence formatBool(java.lang.Boolean b)
Tuple.TupleFormatter
formatBool
in interface Tuple.TupleFormatter
b
- may be nullpublic java.lang.CharSequence formatTuple(Tuple t)
Tuple.TupleFormatter
formatTuple
in interface Tuple.TupleFormatter
t
- may be nullpublic java.lang.CharSequence formatList(CompleteDataType elementType, java.util.List<?> l)
Tuple.TupleFormatter
formatList
in interface Tuple.TupleFormatter
elementType
- the data type of all list elementsl
- may be nullpublic java.lang.CharSequence formatFunction(Function f)
Tuple.TupleFormatter
formatFunction
in interface Tuple.TupleFormatter
f
- may be null