Class FunctionArgument
- java.lang.Object
-
- com.aquima.interactions.expressions.functions.FunctionArgument
-
- All Implemented Interfaces:
IArgumentType
,Serializable
public class FunctionArgument extends Object implements IArgumentType
This class holds the definition of a single function argument.- Since:
- 6.4
- Author:
- F. van der Meer, O. Kerpershoek
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description FunctionArgument(String name, DataType type, boolean isMultiValue)
Constructs a required function argument definition.FunctionArgument(String name, DataType type, boolean isMultiValue, boolean isOptional)
Constructs the function argument definition with the supplied arguments.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getName()
This method returns the name of the argument.DataType
getType()
This method returns the data type of the argument.boolean
isMultivalue()
This method returns a boolean indicating if the argument is a list value.boolean
isOptional()
This method returns a boolean indicating if the argument is optional.String
toString()
-
-
-
Constructor Detail
-
FunctionArgument
public FunctionArgument(String name, DataType type, boolean isMultiValue)
Constructs a required function argument definition.- Parameters:
name
- The name of the argument.type
- The data type of the argument.isMultiValue
- Boolean indicating if the argument is a list.
-
FunctionArgument
public FunctionArgument(String name, DataType type, boolean isMultiValue, boolean isOptional)
Constructs the function argument definition with the supplied arguments.- Parameters:
name
- The name of the argument.type
- The data type of the argument.isMultiValue
- Boolean indicating if the argument is a list.isOptional
- Boolean indicating if this argument is optional.
-
-
Method Detail
-
getName
public String getName()
Description copied from interface:IArgumentType
This method returns the name of the argument. The current implementation does not (yet) bind the arguments by name, hence this parameter is optional.- Specified by:
getName
in interfaceIArgumentType
- Returns:
- The name of the parameter.
-
getType
public DataType getType()
Description copied from interface:IArgumentType
This method returns the data type of the argument.- Specified by:
getType
in interfaceIArgumentType
- Returns:
- the data type of the argument.
-
isMultivalue
public boolean isMultivalue()
Description copied from interface:IArgumentType
This method returns a boolean indicating if the argument is a list value.- Specified by:
isMultivalue
in interfaceIArgumentType
- Returns:
- boolean indicating if the argument is a list value.
-
isOptional
public boolean isOptional()
Description copied from interface:IArgumentType
This method returns a boolean indicating if the argument is optional. An optional argument may be omitted when invoking the function. Optional arguments may only be followed by other optional arguments.- Specified by:
isOptional
in interfaceIArgumentType
- Returns:
- Boolean indicating if the argument is optional.
-
-