Package com.streambase.sb
Interface Tuple.TupleFormatter
-
- All Known Implementing Classes:
Tuple.DefaultTupleFormatter
- Enclosing class:
- Tuple
public static interface Tuple.TupleFormatter
This 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.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.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CharSequence
formatBlob(ByteArrayView blob)
Return a string representation of the given StreamBase blob valueCharSequence
formatBool(Boolean b)
Return a string representation of the given StreamBase boolean valueCharSequence
formatDouble(Double d)
Return a string representation of the given StreamBase double valueCharSequence
formatFunction(Function f)
Return a string representation of the given StreamBase functionCharSequence
formatInt(Integer i)
Return a string representation of the given StreamBase integer valueCharSequence
formatList(CompleteDataType elementType, List<?> l)
Return a string representation of the given StreamBase listCharSequence
formatLong(Long l)
Return a string representation of the given StreamBase long valueCharSequence
formatString(String s)
Return a string representation of the given StreamBase string valueCharSequence
formatTimestamp(Timestamp t)
Return a string representation of the given StreamBase timestamp valueCharSequence
formatTuple(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
-
-