public static interface Tuple.TupleFormatter
Tuple.getTupleFormatter()
or
customize your formatter by subclassing Tuple.DefaultTupleFormatter
instead.
Used to format tuple fields, by converting a StreamBase field's value to a string. TupleFormatters must handle the case for when the given value is null, but should never return null.
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
|
java.lang.CharSequence formatBlob(ByteArrayView blob)
blob
- may be nulljava.lang.CharSequence formatTimestamp(Timestamp t)
t
- may be nulljava.lang.CharSequence formatString(java.lang.String s)
s
- may be nulljava.lang.CharSequence formatInt(java.lang.Integer i)
i
- may be nulljava.lang.CharSequence formatDouble(java.lang.Double d)
d
- may be nulljava.lang.CharSequence formatLong(java.lang.Long l)
l
- may be nulljava.lang.CharSequence formatBool(java.lang.Boolean b)
b
- may be nulljava.lang.CharSequence formatTuple(Tuple t)
t
- may be nulljava.lang.CharSequence formatList(CompleteDataType elementType, java.util.List<?> l)
elementType
- the data type of all list elementsl
- may be nulljava.lang.CharSequence formatFunction(Function f)
f
- may be null