public class

NumberOfArgumentsValidator

extends Object
java.lang.Object
   ↳ com.atlassian.jira.jql.validator.NumberOfArgumentsValidator

Class Overview

Simple Function Operand Validator that validates the number of arguments in the FunctionOperand.

Summary

Public Constructors
NumberOfArgumentsValidator(int expected, I18nHelper i18nHelper)
NumberOfArgumentsValidator(int minExpected, int maxExpected, I18nHelper i18nHelper)
Public Methods
MessageSet validate(FunctionOperand operand)
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public NumberOfArgumentsValidator (int expected, I18nHelper i18nHelper)

Parameters
expected the number of arguments expected. Input operands must have this exact number of arguments. Cannot be negative.
i18nHelper used for printing errors.

public NumberOfArgumentsValidator (int minExpected, int maxExpected, I18nHelper i18nHelper)

Parameters
minExpected the minimum number of arguments expected (inclusive). Cannot be negative.
maxExpected the maximum number of arguments expected (inclusive). Cannot be negative.
i18nHelper used for printing errors.

Public Methods

public MessageSet validate (FunctionOperand operand)

Parameters
operand the function operand to validate
Returns
  • a message set with errors if the number of arguments was not as expected, otherwise an empty message set. Never null.