public class MathFunction extends ADQLFunction
MathFunctionType
ADQLFunction.ParameterIterator
Constructor and Description |
---|
MathFunction(MathFunction toCopy)
Builds a mathematical function by copying the given one.
|
MathFunction(MathFunctionType t)
Creates a mathematical function without parameter.
|
MathFunction(MathFunctionType t,
ADQLOperand parameter)
Creates a mathematical function with only one parameter.
|
MathFunction(MathFunctionType t,
ADQLOperand parameter1,
ADQLOperand parameter2)
Creates a mathematical function with two parameters.
|
Modifier and Type | Method and Description |
---|---|
ADQLObject |
getCopy()
Gets a (deep) copy of this ADQL object.
|
java.lang.String |
getName()
Gets the name of this object in ADQL.
|
int |
getNbParameters()
Gets the number of parameters this function has.
|
ADQLOperand |
getParameter(int index)
Gets the index-th parameter.
|
ADQLOperand[] |
getParameters()
Gets the list of all parameters of this function.
|
MathFunctionType |
getType()
Gets the type of the function (ABS, COS, SIN, ...).
|
boolean |
isGeometry()
Tell whether this operand is a geometrical region or not.
|
boolean |
isNumeric()
Tell whether this operand is numeric or not.
|
boolean |
isString()
Tell whether this operand is a string or not.
|
ADQLOperand |
setParameter(int index,
ADQLOperand replacer)
Replaces the index-th parameter by the given one.
|
adqlIterator, getPosition, paramIterator, setPosition, toADQL
public MathFunction(MathFunctionType t) throws java.lang.Exception
t
- The type of the function.java.lang.Exception
- If the given function parameters are incorrect.MathFunction(MathFunctionType, ADQLOperand, ADQLOperand)
public MathFunction(MathFunctionType t, ADQLOperand parameter) throws java.lang.Exception
t
- The type of the function.parameter
- Its only parameter.java.lang.Exception
- If the given function parameters are incorrect.MathFunction(MathFunctionType, ADQLOperand, ADQLOperand)
public MathFunction(MathFunctionType t, ADQLOperand parameter1, ADQLOperand parameter2) throws java.lang.Exception
t
- The type of the function.parameter1
- Its first parameter.parameter2
- Its second parameter.java.lang.Exception
- If the given function parameters are incorrect.public MathFunction(MathFunction toCopy) throws java.lang.Exception
toCopy
- The mathematical function to copy.java.lang.Exception
- If there is an error during the copy.public final MathFunctionType getType()
MathFunctionType
public ADQLObject getCopy() throws java.lang.Exception
ADQLObject
java.lang.Exception
- If there is any error during the copy.public java.lang.String getName()
ADQLObject
public final boolean isNumeric()
ADQLOperand
public final boolean isString()
ADQLOperand
public final boolean isGeometry()
ADQLOperand
public ADQLOperand[] getParameters()
ADQLFunction
getParameters
in class ADQLFunction
public int getNbParameters()
ADQLFunction
getNbParameters
in class ADQLFunction
public ADQLOperand getParameter(int index) throws java.lang.ArrayIndexOutOfBoundsException
ADQLFunction
getParameter
in class ADQLFunction
index
- Parameter number.java.lang.ArrayIndexOutOfBoundsException
- If the index is incorrect (index < 0 || index >= getNbParameters()).public ADQLOperand setParameter(int index, ADQLOperand replacer) throws java.lang.ArrayIndexOutOfBoundsException, java.lang.NullPointerException, java.lang.Exception
ADQLFunction
setParameter
in class ADQLFunction
index
- Index of the parameter to replace.replacer
- The replacer.java.lang.ArrayIndexOutOfBoundsException
- If the index is incorrect (index < 0 || index >= getNbParameters()).java.lang.NullPointerException
- If a required parameter must be replaced by a NULL object.java.lang.Exception
- If another error occurs.