Package com.fathzer.soft.javaluator
Class Function
java.lang.Object
com.fathzer.soft.javaluator.Function
A function.
- Author:
- Jean-Marc Astesana
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintGets the function's maximum argument count.intGets the function's minimum argument count.getName()Gets the function's name.
-
Constructor Details
-
Function
Constructor.
This constructor builds a function with a fixed arguments count.- Parameters:
name- The function's nameargumentCount- The function's argument count.- Throws:
IllegalArgumentException- if argumentCount is lower than 0 or if the function name is null or empty.
-
Function
Constructor.
This constructor builds a function with a variable arguments count.
For instance, a minimum function may have at least one argument.- Parameters:
name- The function's nameminArgumentCount- The function's minimum argument count.maxArgumentCount- The function's maximum argument count (Integer.MAX_VALUE to specify no upper limit).- Throws:
IllegalArgumentException- if minArgumentCount is less than 0 or greater than maxArgumentCount or if the function name is null or empty.
-
-
Method Details
-
getName
Gets the function's name.- Returns:
- the name of the function
-
getMinimumArgumentCount
public int getMinimumArgumentCount()Gets the function's minimum argument count.- Returns:
- an integer
-
getMaximumArgumentCount
public int getMaximumArgumentCount()Gets the function's maximum argument count.- Returns:
- an integer
-