Package net.sf.basedb.util.jep.convert
Class AbstractJepConversionFunction<T>
java.lang.Object
net.sf.basedb.util.jep.convert.AbstractJepConversionFunction<T>
- All Implemented Interfaces:
JepConversionFunction<T>
- Direct Known Subclasses:
AbsConverter
,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 abstract class AbstractJepConversionFunction<T>
extends Object
implements JepConversionFunction<T>
Abstract superclass implementing the
JepConversionFunction
interface. This class throws an UnsupportedOperationException
for the toExpression(Object)
and toRestriction(Object)
methods. A subclass should override at least one of the methods.- Version:
- 2.4
- Author:
- nicklas
- Last modified
- $Date: 2012-09-14 09:28:35 +0200 (fr, 14 sep 2012) $
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet a short description of the function or operatorgetName()
Get the name of the function or the symbol of the operatorboolean
If this converter is a built-in function.boolean
If this converter is a built-in operator.toExpression
(T node) Convert to a restriction and then useExpressions.bool(Restriction)
to create a boolean expression.toRestriction
(T node) Convert the object to a restriction.
-
Constructor Details
-
AbstractJepConversionFunction
protected AbstractJepConversionFunction()
-
-
Method Details
-
isFunction
public boolean isFunction()Description copied from interface:JepConversionFunction
If this converter is a built-in function. Built-in functions are automatically put in the enumeration return byJep.getFunctions()
.- Specified by:
isFunction
in interfaceJepConversionFunction<T>
- Returns:
- Always FALSE
-
isOperator
public boolean isOperator()Description copied from interface:JepConversionFunction
If this converter is a built-in operator.- Specified by:
isOperator
in interfaceJepConversionFunction<T>
- Returns:
- Always FALSE
-
getName
Description copied from interface:JepConversionFunction
Get the name of the function or the symbol of the operator- Specified by:
getName
in interfaceJepConversionFunction<T>
- Returns:
- Always null
-
getDescription
Description copied from interface:JepConversionFunction
Get a short description of the function or operator- Specified by:
getDescription
in interfaceJepConversionFunction<T>
- Returns:
- Always null
-
toExpression
Convert to a restriction and then useExpressions.bool(Restriction)
to create a boolean expression.- Specified by:
toExpression
in interfaceJepConversionFunction<T>
- Parameters:
node
- The object to convert- Returns:
- An expression or null
-
toRestriction
Description copied from interface:JepConversionFunction
Convert the object to a restriction.- Specified by:
toRestriction
in interfaceJepConversionFunction<T>
- Parameters:
node
- The object to convert- Returns:
- A restriction or null
- Throws:
UnsupportedOperationException
- Always
-