SKSample Interface
Implements
public interface SKSample
implements java.lang.annotation.Annotation
Annotation that decorates an DefineKernelFunction annotation to provide examples of how to use the function. For example:
@DefineSKFunction(
name = "add",
description = "Adds two numbers together",
returnType = "java.lang.Integer",
returnDescription = "The sum of the two numbers",
samples = {
@SKSample(inputs = "{\"number1\":1, \"number2\":2", output = "3")
}
)
public static double add(
@SKFunctionParameters(description="The first number to add", name="number1") double number1,
@SKFunctionParameters(description="The second number to add", name="number2") double number2
)
{
return number1 + number2;
}
Method Summary
Modifier and Type | Method and Description |
---|---|
abstract java.lang.String |
inputs()
An example of inputs to the function. |
abstract java.lang.String |
output()
An example output of the function given the inputs. |
Method Details
inputs
public abstract String inputs()
An example of inputs to the function.
Returns:
output
public abstract String output()
An example output of the function given the inputs.
Returns: