Class FunctionResult<T>

  • Type Parameters:
    T - The type of the result of the function invocation.

    public class FunctionResult<T>
    extends Object
    The result of a function invocation.

    This class is used to return the result of a function invocation. It contains the result of the function invocation and metadata about the result.

    • Constructor Detail

      • FunctionResult

        public FunctionResult​(ContextVariable<T> result,
                              @Nullable
                              FunctionResultMetadata metadata)
        Create a new instance of FunctionResult.
        Parameters:
        result - The result of the function invocation.
        metadata - Metadata about the result of the function invocation.
      • FunctionResult

        public FunctionResult​(ContextVariable<T> of)
        Create a new instance of FunctionResult with no metadata.
        Parameters:
        of - The result of the function invocation.
    • Method Detail

      • getResultVariable

        public ContextVariable<T> getResultVariable()
        Get the result of the function invocation.
        Returns:
        The result of the function invocation.
      • getMetadata

        public FunctionResultMetadata getMetadata()
        Get the metadata about the result of the function invocation.
        Returns:
        The metadata about the result of the function invocation.