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 via
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.
-
Method Summary
Modifier and TypeMethodDescriptionformatBlob
(ByteArrayView blob) Return a string representation of the given StreamBase blob valueReturn a string representation of the given StreamBase boolean valueReturn a string representation of the given StreamBase double valueReturn a string representation of the given StreamBase functionReturn a string representation of the given StreamBase integer valueformatList
(CompleteDataType elementType, List<?> l) Return a string representation of the given StreamBase listformatLong
(Long l) Return a string representation of the given StreamBase long valueReturn a string representation of the given StreamBase string valueReturn a string representation of the given StreamBase timestamp valueformatTuple
(Tuple t) Return a string representation of the given StreamBase Tuple value
-
Method Details
-
formatBlob
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
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
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
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
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
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
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
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
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
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
-