|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.jec.Operator
Abstract class parent of every operator. An operator might nest another
operator, resulting in a function composition: OP1(x), OP2(OP1(x))
Thus, applying OP2 to an object 'x', implies appliying OP1 to 'x' and then OP2 to the result.
Field Summary | |
protected Operator[] |
argOps
|
protected Operator |
nestedOp
Nested operator |
static boolean |
showFunctionString
|
Constructor Summary | |
Operator()
Creates a new operator that nest another operator |
|
Operator(Operator nestedOp)
Creates a new operator that nest another operator |
Method Summary | |
java.lang.Object |
apply(java.lang.Object rootCtx,
java.lang.Object ctx)
|
protected abstract java.lang.Object |
directMap(java.lang.Object rootCtx,
java.lang.Object ctx)
Returns the associated value to the given context and root context |
void |
setArgumentOperators(Operator[] argOps)
|
void |
setNestedOperator(Operator nestedOp)
Sets the operator's nested operator |
abstract java.lang.String |
toExpressionString()
Returns an expression String representation for this operator |
abstract java.lang.String |
toFunctionString()
Returns a function representation String for this operator |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static boolean showFunctionString
protected Operator nestedOp
protected Operator[] argOps
Constructor Detail |
public Operator()
public Operator(Operator nestedOp)
Method Detail |
public void setNestedOperator(Operator nestedOp)
public void setArgumentOperators(Operator[] argOps)
public java.lang.String toString()
public abstract java.lang.String toFunctionString()
public abstract java.lang.String toExpressionString()
public final java.lang.Object apply(java.lang.Object rootCtx, java.lang.Object ctx) throws EvaluationException
EvaluationException
protected abstract java.lang.Object directMap(java.lang.Object rootCtx, java.lang.Object ctx) throws EvaluationException
rootCtx
- The root context, needed for operators that require
expression evaluation from root point. Example: Indexer operatorsctx
- The current context where the operator will work over
EvaluationException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |