Interface ArgsProblems

All Superinterfaces:
ProblemFactory

public interface ArgsProblems extends ProblemFactory

Factory for producing problems that involve arguments - either to a function or a pipeline step.

  • Method Details

    • notNumeric

      Problem notNumeric(FunctionArgument argument, Type actual)
    • wrongNumber

      Problem wrongNumber(int expected, int actual)
    • wrongNumber

      Problem wrongNumber(com.google.common.collect.Range<Integer> expected, int actual)
    • wrongNumberRange

      Problem wrongNumberRange(int min, int max, int actual)

      When a variable number of arguments is allowed, but the number supplied is outside of that range.

      Parameters:
      min - lest number of arguments required
      max - greatest number of arguments allowed
      actual - the number of arguments supplied
    • realizableDidNotMatch

      Problem realizableDidNotMatch(IdentifiedFunction target, List<Type> givenTypes)
    • realizableDidNotMatch

      Problem realizableDidNotMatch(Class<?> target, List<Type> givenTypes)
    • mismatch

      static Problem mismatch(FunctionArgument argument, Type actual)

      Convenient way to generate a Problem when there's a type mismatch for one of the supplied arguments.

    • mismatch

      static Problem mismatch(FunctionArgument argument, Type actual, List<Type> allowedTypes)

      Convenient way to generate a Problem when there's a type mismatch for one of the supplied arguments. Used when the function allows the argument to be one of the allowedTypes but actual is not one of them.

    • get

      static ArgsProblems get()
    • required

      Problem required(String keyword)

      A required keyword argument is not present

      NB this is currently only likely to happen for aggregate functions, as they realize differently. However once we address GL#114 we might support named arguments in plain function calls as well without the existing ordering restriction, and so this might be a nicer/better error message than the arity error we have