Interface ArgsProblems
- All Superinterfaces:
ProblemFactory
Factory for producing problems that involve arguments - either to a function or a pipeline step.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ArgsProblems
get()
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.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.notNumeric
(FunctionArgument argument, Type actual) realizableDidNotMatch
(Class<?> target, List<Type> givenTypes) realizableDidNotMatch
(IdentifiedFunction target, List<Type> givenTypes) A required keyword argument is not presentwrongNumber
(int expected, int actual) wrongNumber
(com.google.common.collect.Range<Integer> expected, int actual) wrongNumberRange
(int min, int max, int actual) When a variable number of arguments is allowed, but the number supplied is outside of that range.
-
Method Details
-
notNumeric
-
wrongNumber
-
wrongNumber
-
wrongNumberRange
When a variable number of arguments is allowed, but the number supplied is outside of that range.
- Parameters:
min
- lest number of arguments requiredmax
- greatest number of arguments allowedactual
- the number of arguments supplied
-
realizableDidNotMatch
-
realizableDidNotMatch
-
mismatch
Convenient way to generate a Problem when there's a type mismatch for one of the supplied arguments.
-
mismatch
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
-
required
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
-