Class ObjectInputTyper

java.lang.Object
com.pervasive.datarush.functions.ObjectInputTyper
All Implemented Interfaces:
FunctionTyper

public class ObjectInputTyper extends Object implements FunctionTyper
A typer determining the output type of a function based on the types of one or more Object inputs. If more than one input is used, the widest of the inputs is used.
  • Field Details

  • Constructor Details

    • ObjectInputTyper

      public ObjectInputTyper(int... indices)
    • ObjectInputTyper

      public ObjectInputTyper(ScalarTokenType bound, int... indices)
  • Method Details

    • computeUpperBound

      public ScalarTokenType computeUpperBound(FunctionContext ctx)
      Description copied from interface: FunctionTyper
      Calculates the upper bound for the function given the provided context.

      The context contains the upper bounds on the types of all arguments to the function. If a argument is not a subclass of ScalarValuedFunction, its type is null.

      Specified by:
      computeUpperBound in interface FunctionTyper
      Parameters:
      ctx - the context of the function being processed
      Returns:
      the upper bound on the function
    • computeResultType

      public ScalarTokenType computeResultType(FunctionContext ctx)
      Description copied from interface: FunctionTyper
      Calculates the result type for the function given the provided context.

      The context contains the actual result types of all arguments to the function. If a argument is not a subclass of ScalarValuedFunction, its type is null.

      Specified by:
      computeResultType in interface FunctionTyper
      Parameters:
      ctx - the context of the function being processed
      Returns:
      the result type of the function