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,
                              @Nullable
                              Object unconvertedResult)
        Create a new instance of FunctionResult.
        Parameters:
        result - The result of the function invocation.
        metadata - Metadata about the result of the function invocation.
        unconvertedResult - The result of the function invocation before it was converted to the expected type.
      • FunctionResult

        public FunctionResult​(ContextVariable<T> of,
                              @Nullable
                              Object unconvertedResult)
        Create a new instance of FunctionResult with no metadata.
        Parameters:
        of - The result of the function invocation.
        unconvertedResult - The result of the function invocation before it was converted to the expected type.
    • 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.
      • getUnconvertedResult

        @Nullable
        public Object getUnconvertedResult()
        Get the result of the function invocation before it was converted to the expected type.
        Returns:
        The result of the function invocation before it was converted to the expected type.