Class AbstractFunction
java.lang.Object
org.gvsig.expressionevaluator.spi.AbstractFunction
- All Implemented Interfaces:
Function
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static org.slf4j.Loggerprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intFields inherited from interface org.gvsig.expressionevaluator.Function
GROUP_AGGREGATE, GROUP_BOOLEAN, GROUP_CONVERSION, GROUP_DATETIME, GROUP_NUMERIC, GROUP_OGC, GROUP_OTHER, GROUP_PROGRAMMING, GROUP_STRING -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractFunction(String group, String name, org.apache.commons.lang3.Range argc) protectedAbstractFunction(String group, String name, org.apache.commons.lang3.Range argc, String description, String template) protectedAbstractFunction(String group, String name, org.apache.commons.lang3.Range argc, String description, String template, String[] descriptionArgs) protectedAbstractFunction(String group, String name, org.apache.commons.lang3.Range argc, String description, String template, String[] descriptionArgs, String returnType) protectedAbstractFunction(String group, String name, org.apache.commons.lang3.Range argc, String description, String template, String[] descriptionArgs, String returnType, boolean sqlCompatible) -
Method Summary
Modifier and TypeMethodDescriptionvoidaliases()booleanReturns true if the function always returns the same value for the same parameters.org.apache.commons.lang3.Rangeargc()call(Interpreter interpreter, Codes args) protected voidcheckDoubleValue(double value) protected voidcheckFloatValue(float value) String[]protected BigDecimalgetBigDecimal(Object value, int arg) protected booleangetBoolean(Object[] args, int n) protected booleangetBoolean(Object[] args, int n, Double accuracy) protected booleangetBoolean(Object value, int n) protected booleangetBoolean(Object value, int n, Double accuracy) protected booleangetBoolean(Interpreter interpreter, Codes args, int n) protected ComparablegetComparable(Object[] args, int n) protected ComparablegetComparable(Object value, int n) protected Comparableprotected Dateprotected doubleprotected doubleprotected Fileprotected Fileprotected floatprotected floatReturn a full description of the funcion internationalized in HTML.protected intprotected intprotected intgetInt(Interpreter interpreter, Codes args, int n) protected javax.json.JsonArraygetJsonArray(Object[] args, int n) protected javax.json.JsonArraygetJsonArray(Object value, int n) protected javax.json.JsonObjectgetJsonObject(Object[] args, int n) protected javax.json.JsonObjectgetJsonObject(Object value, int n) protected javax.json.JsonStructuregetJsonStructure(Object[] args, int n) protected javax.json.JsonStructuregetJsonStructure(Object value, int n) protected org.gvsig.tools.util.GetItemWithSize64protected LocalDateTimegetLocalDateTime(Object[] args, int n) protected LocalDateTimegetLocalDateTime(Object value, int n) protected longprotected longprotected Objectprotected ObjectgetObject(Interpreter interpreter, Codes args, int n) protected Stringprotected Stringprotected intgroup()booleanisHidden()protected booleanbooleanbooleanname()voidsetDescription(String description) voidsetDescriptionArgs(String[] descriptionArgs) voidsetReturnType(String returnType) voidsetTemplate(String template) template()protected booleantoString()toValue(ExpressionBuilder builder, Codes parameters) boolean
-
Field Details
-
LOGGER
protected static org.slf4j.Logger LOGGER -
TYPE_INT
protected static final int TYPE_INT- See Also:
-
TYPE_LONG
protected static final int TYPE_LONG- See Also:
-
TYPE_FLOAT
protected static final int TYPE_FLOAT- See Also:
-
TYPE_DOUBLE
protected static final int TYPE_DOUBLE- See Also:
-
TYPE_BOOLEAN
protected static final int TYPE_BOOLEAN- See Also:
-
TYPE_STRING
protected static final int TYPE_STRING- See Also:
-
TYPE_DATE
protected static final int TYPE_DATE- See Also:
-
TYPE_NULL
protected static final int TYPE_NULL- See Also:
-
TYPE_BIGDECIMAL
protected static final int TYPE_BIGDECIMAL- See Also:
-
-
Constructor Details
-
AbstractFunction
-
AbstractFunction
-
AbstractFunction
-
AbstractFunction
-
AbstractFunction
-
-
Method Details
-
name
-
returnType
- Specified by:
returnTypein interfaceFunction
-
group
-
argc
public org.apache.commons.lang3.Range argc() -
description
- Specified by:
descriptionin interfaceFunction
-
descriptionArgs
- Specified by:
descriptionArgsin interfaceFunction
-
setDescription
-
setTemplate
-
setDescriptionArgs
-
setReturnType
-
getFullDescription
Description copied from interface:FunctionReturn a full description of the funcion internationalized in HTML. This full description contains, t name, description, args, template and return type.- Specified by:
getFullDescriptionin interfaceFunction- Returns:
- full description in HTML as a String
-
addAlias
-
aliases
-
template
-
isOperator
public boolean isOperator()- Specified by:
isOperatorin interfaceFunction
-
isHidden
public boolean isHidden() -
useArgumentsInsteadObjects
public boolean useArgumentsInsteadObjects()- Specified by:
useArgumentsInsteadObjectsin interfaceFunction
-
isSQLCompatible
public boolean isSQLCompatible()- Specified by:
isSQLCompatiblein interfaceFunction
-
allowConstantFolding
public boolean allowConstantFolding()Description copied from interface:FunctionReturns true if the function always returns the same value for the same parameters. If so, it is possible to optimize the generated code through the process of "constant folding". https://en.wikipedia.org/wiki/Constant_folding- Specified by:
allowConstantFoldingin interfaceFunction- Returns:
- true if this function allow constant folding optimization.
-
call
-
getInt
-
getInt
-
getInt
-
getLong
-
getLong
-
getDouble
-
getDouble
-
getBigDecimal
-
getFloat
-
getFloat
-
getStr
-
getStr
-
getFile
-
getFile
-
isNull
-
getObject
-
getJsonObject
-
getJsonObject
-
getJsonArray
-
getJsonArray
-
getJsonStructure
-
getJsonStructure
-
getObject
-
getComparable
-
getComparable
-
getDate
-
getDate
-
getLocalDateTime
-
getLocalDateTime
-
getURL
- Throws:
MalformedURLException
-
getBoolean
-
getBoolean
-
getBoolean
-
getBoolean
-
getBoolean
-
toBoolean
-
getList
-
getType
-
toString
-
toString
-
checkDoubleValue
protected void checkDoubleValue(double value) -
checkFloatValue
protected void checkFloatValue(float value) -
toValue
-