public interface Function
extends java.lang.Cloneable, com.streambase.sb.internal.CloneableData
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
apply(java.lang.Object... args)
Applies the given arguments to this function and returns the output.
|
java.lang.Object |
apply(Tuple input)
Applies the given arguments to this function and returns the output.
|
Schema |
getArgumentSchema()
Returns Schema for the input argument types of the function.
|
java.lang.String |
getBody()
Returns a string with the StreamBase expression that is the body of this function.
|
java.lang.String |
getName()
Returns the name of this function.
|
CompleteDataType |
getReturnType()
Returns the CompleteDataType for the function's return type.
|
java.lang.String |
getStringRep()
Returns a string with the StreamBase expression that creates this function.
|
boolean |
isCacheable() |
boolean isCacheable()
Schema getArgumentSchema()
CompleteDataType getReturnType()
CompleteDataType
for the function's return typejava.lang.String getBody()
Returns a string with the StreamBase expression that is the body of this function.
Eg., For this function "function (arg0 int, arg1) → int { arg0 + arg1 }" getBody() would return "arg0 + arg1"
java.lang.String getStringRep()
Returns a string with the StreamBase expression that creates this function.
Eg., For this function "function (arg0 int, arg1) → int { arg0 + arg1 }" getStringRep() would return "function (arg0 int, arg1) → int { arg0 + arg1 }"
java.lang.String getName()
java.lang.Object apply(Tuple input) throws StreamBaseException
input
- Tuple
whose schema is the same as this function's input argument
schema. The field values must be the input values
that should be applied to this function.StreamBaseException
- if any unexpected error occursjava.lang.Object apply(java.lang.Object... args) throws StreamBaseException
args
- Array of arguments that are to be applied to the functionStreamBaseException
- if any unexpected error occurs