public abstract class AbstractJepConversionFunction<T> extends Object implements JepConversionFunction<T>
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.Modifier | Constructor and Description |
---|---|
protected |
AbstractJepConversionFunction() |
Modifier and Type | Method and Description |
---|---|
String |
getDescription()
Get a short description of the function or operator
|
String |
getName()
Get the name of the function or the symbol of the operator
|
boolean |
isFunction()
If this converter is a built-in function.
|
boolean |
isOperator()
If this converter is a built-in operator.
|
Expression |
toExpression(T node)
Convert to a restriction and then use
Expressions.bool(Restriction)
to create a boolean expression. |
Restriction |
toRestriction(T node)
Convert the object to a restriction.
|
public boolean isFunction()
JepConversionFunction
Jep.getFunctions()
.isFunction
in interface JepConversionFunction<T>
public boolean isOperator()
JepConversionFunction
isOperator
in interface JepConversionFunction<T>
public String getName()
JepConversionFunction
getName
in interface JepConversionFunction<T>
public String getDescription()
JepConversionFunction
getDescription
in interface JepConversionFunction<T>
public Expression toExpression(T node)
Expressions.bool(Restriction)
to create a boolean expression.toExpression
in interface JepConversionFunction<T>
node
- The object to convertpublic Restriction toRestriction(T node)
JepConversionFunction
toRestriction
in interface JepConversionFunction<T>
node
- The object to convertUnsupportedOperationException
- Always