Package com.streambase.sb
Interface Tuple.TupleFormatter
-
- All Known Implementing Classes:
Tuple.DefaultTupleFormatter
- Enclosing class:
- Tuple
public static interface Tuple.TupleFormatterThis interface is not public API, and should not be implemented by users. Use the default StreamBase implementation viaTuple.getTupleFormatter()or customize your formatter by subclassingTuple.DefaultTupleFormatterinstead.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.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CharSequenceformatBlob(ByteArrayView blob)Return a string representation of the given StreamBase blob valueCharSequenceformatBool(Boolean b)Return a string representation of the given StreamBase boolean valueCharSequenceformatDouble(Double d)Return a string representation of the given StreamBase double valueCharSequenceformatFunction(Function f)Return a string representation of the given StreamBase functionCharSequenceformatInt(Integer i)Return a string representation of the given StreamBase integer valueCharSequenceformatList(CompleteDataType elementType, List<?> l)Return a string representation of the given StreamBase listCharSequenceformatLong(Long l)Return a string representation of the given StreamBase long valueCharSequenceformatString(String s)Return a string representation of the given StreamBase string valueCharSequenceformatTimestamp(Timestamp t)Return a string representation of the given StreamBase timestamp valueCharSequenceformatTuple(Tuple t)Return a string representation of the given StreamBase Tuple value
-
-
-
Method Detail
-
formatBlob
CharSequence formatBlob(ByteArrayView blob)
Return a string representation of the given StreamBase blob value- Parameters:
blob- may be null- Returns:
- a non-null string representation of the value given
-
formatTimestamp
CharSequence formatTimestamp(Timestamp t)
Return a string representation of the given StreamBase timestamp value- Parameters:
t- may be null- Returns:
- a non-null string representation of the value given
-
formatString
CharSequence formatString(String s)
Return a string representation of the given StreamBase string value- Parameters:
s- may be null- Returns:
- a non-null string representation of the value given
-
formatInt
CharSequence formatInt(Integer i)
Return a string representation of the given StreamBase integer value- Parameters:
i- may be null- Returns:
- a non-null string representation of the value given
-
formatDouble
CharSequence formatDouble(Double d)
Return a string representation of the given StreamBase double value- Parameters:
d- may be null- Returns:
- a non-null string representation of the value given
-
formatLong
CharSequence formatLong(Long l)
Return a string representation of the given StreamBase long value- Parameters:
l- may be null- Returns:
- a non-null string representation of the value given
-
formatBool
CharSequence formatBool(Boolean b)
Return a string representation of the given StreamBase boolean value- Parameters:
b- may be null- Returns:
- a non-null string representation of the value given
-
formatTuple
CharSequence formatTuple(Tuple t)
Return a string representation of the given StreamBase Tuple value- Parameters:
t- may be null- Returns:
- a non-null string representation of the value given
-
formatList
CharSequence formatList(CompleteDataType elementType, List<?> l)
Return a string representation of the given StreamBase list- Parameters:
elementType- the data type of all list elementsl- may be null- Returns:
- a non-null string representation of the value given
-
formatFunction
CharSequence formatFunction(Function f)
Return a string representation of the given StreamBase function- Parameters:
f- may be null- Returns:
- a non-null string representation of the value given
- Since:
- 7.4
-
-