public class AreaFunction extends GeometryFunction
It represents the AREA function of ADQL.
This function computes the area, in square degrees, of a given geometry.
Example:
AREA(CIRCLE('ICRS GEOCENTER', 25.4, -20.0, 1)).
Inappropriate geometries for this construct (e.g. POINT) SHOULD either return zero or throw an error message. This choice must be done in an extended class of AreaFunction.
GeometryFunction.GeometryValue<F extends GeometryFunction>ADQLFunction.ParameterIteratorcoordSys| Constructor and Description |
|---|
AreaFunction(AreaFunction toCopy)
Builds an AREA function by copying the given one.
|
AreaFunction(GeometryFunction.GeometryValue<GeometryFunction> param)
Builds an AREA function with its parameter.
|
| 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.
|
GeometryFunction.GeometryValue<GeometryFunction> |
getParameter()
Gets the parameter of the AREA function (so, a region whose the area must be computed).
|
ADQLOperand |
getParameter(int index)
Gets the index-th parameter.
|
ADQLOperand[] |
getParameters()
Gets the list of all parameters of this function.
|
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.
|
void |
setParameter(GeometryFunction.GeometryValue<GeometryFunction> parameter)
Sets the parameter of the AREA function (so, a region whose the area must be computed).
|
ADQLOperand |
setParameter(int index,
ADQLOperand replacer)
Replaces the index-th parameter by the given one.
|
getCoordinateSystem, setCoordinateSystemadqlIterator, getPosition, paramIterator, setPosition, toADQLpublic AreaFunction(GeometryFunction.GeometryValue<GeometryFunction> param) throws java.lang.NullPointerException
param - Parameter of AREA.java.lang.NullPointerException - If the given operand is null or if it's not a GeometryFunction.public AreaFunction(AreaFunction toCopy) throws java.lang.Exception
toCopy - The AREA function to copy.java.lang.Exception - If there is an error during the copy.public final GeometryFunction.GeometryValue<GeometryFunction> getParameter()
public final void setParameter(GeometryFunction.GeometryValue<GeometryFunction> parameter)
parameter - A region.public ADQLObject getCopy() throws java.lang.Exception
ADQLObjectjava.lang.Exception - If there is any error during the copy.public java.lang.String getName()
ADQLObjectpublic boolean isNumeric()
ADQLOperandpublic boolean isString()
ADQLOperandpublic boolean isGeometry()
ADQLOperandpublic ADQLOperand[] getParameters()
ADQLFunctiongetParameters in class ADQLFunctionpublic int getNbParameters()
ADQLFunctiongetNbParameters in class ADQLFunctionpublic ADQLOperand getParameter(int index) throws java.lang.ArrayIndexOutOfBoundsException
ADQLFunctiongetParameter in class ADQLFunctionindex - 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
ADQLFunctionsetParameter in class ADQLFunctionindex - 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.