Package net.sf.basedb.util.jep.convert
Interface JepConversionFunction<T>
-
- All Known Implementing Classes:
AbsConverter
,AbstractJepConversionFunction
,AddConverter
,AndConverter
,ASTConstantConverter
,ASTFunNodeConverter
,ASTVarNodeConverter
,DivideConverter
,EqualsConverter
,ExpConverter
,FloatConverter
,GreaterConverter
,GreaterEqualsConverter
,IfConverter
,IntegerConverter
,LessConverter
,LessEqualsConverter
,LogarithmConverter
,MultiplyConverter
,NaturalLogarithmConverter
,NotConverter
,NotEqualsConverter
,OrConverter
,SquareRootConverter
,StringConverter
,SubtractConverter
,UMinusConverter
public interface JepConversionFunction<T>
Convert a built-in JEP function or operation to a Query APIExpression
orRestriction
. Custom function should implementJepExpressionFunction
which supports automatic conversion.- Version:
- 2.4
- Author:
- nicklas
- Last modified
- $Date: 2008-09-11 22:08:14 +0200 (to, 11 sep 2008) $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getDescription()
Get a short description of the function or operatorString
getName()
Get the name of the function or the symbol of the operatorboolean
isFunction()
If this converter is a built-in function.boolean
isOperator()
If this converter is a built-in operator.Expression
toExpression(T node)
Convert the object to an expression.Restriction
toRestriction(T node)
Convert the object to a restriction.
-
-
-
Method Detail
-
isFunction
boolean isFunction()
If this converter is a built-in function. Built-in functions are automatically put in the enumeration return byJep.getFunctions()
.- Returns:
- TRUE if it is a function, FALSE otherwise
-
isOperator
boolean isOperator()
If this converter is a built-in operator.- Returns:
- TRUE if it is an operator, FALSE otherwise
-
getName
String getName()
Get the name of the function or the symbol of the operator- Returns:
- The name or symbol or null
-
getDescription
String getDescription()
Get a short description of the function or operator- Returns:
- The description or null
-
toExpression
Expression toExpression(T node)
Convert the object to an expression.- Parameters:
node
- The object to convert- Returns:
- An expression or null
- Throws:
UnsupportedOperationException
- If this converter can't convert to expressions
-
toRestriction
Restriction toRestriction(T node)
Convert the object to a restriction.- Parameters:
node
- The object to convert- Returns:
- A restriction or null
- Throws:
UnsupportedOperationException
- If this converter can't convert to restrictions
-
-