|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.jec.Operator net.sf.jec.InvertibleOperator net.sf.jec.IndexerOperator
IndexerOperator operates on indexed objects as List, NodeList or Map. Accepts an operator as the index provider. If the operator's context is a List, the index operator must be convertible to 'int'. For Map contexts, the index operator can produce any Object as index.
Field Summary |
Fields inherited from class net.sf.jec.Operator |
argOps, nestedOp, showFunctionString |
Constructor Summary | |
IndexerOperator(Operator indexOperator,
Operator nestedOp,
boolean throwExceptions)
This operator requires object conversion and an operator chain that resolves the selected index. |
Method Summary | |
protected java.lang.Object |
directMap(java.lang.Object rootCtx,
java.lang.Object ctx)
Returns the associated value to the given context and root context |
protected void |
inverseMap(java.lang.Object rootCtx,
java.lang.Object ctx,
java.lang.Object value)
Sets the given value if this operator is at the end of the operator chain or just resolves the context object and passes it to the next operator in the chain. |
java.lang.String |
toExpressionString()
Returns an expression String representation for this operator |
java.lang.String |
toFunctionString()
Returns a function representation String for this operator |
Methods inherited from class net.sf.jec.InvertibleOperator |
applyInverse |
Methods inherited from class net.sf.jec.Operator |
apply, setArgumentOperators, setNestedOperator, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public IndexerOperator(Operator indexOperator, Operator nestedOp, boolean throwExceptions)
Method Detail |
public java.lang.String toFunctionString()
toFunctionString
in class Operator
public java.lang.String toExpressionString()
toExpressionString
in class Operator
protected java.lang.Object directMap(java.lang.Object rootCtx, java.lang.Object ctx) throws EvaluationException
directMap
in class Operator
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
protected void inverseMap(java.lang.Object rootCtx, java.lang.Object ctx, java.lang.Object value) throws EvaluationException
inverseMap
in class InvertibleOperator
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 overvalue
- The value to set.
EvaluationException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |