net.sf.jec
Class InvertibleOperator

java.lang.Object
  extended bynet.sf.jec.Operator
      extended bynet.sf.jec.InvertibleOperator
Direct Known Subclasses:
AccessorOperator, IndexerOperator

public abstract class InvertibleOperator
extends Operator

Abstract class parent of every invertible operator. An invertible operator is an operator able to perform the inverse function. Thus, being y=OP.apply(x) is true that x=OP.applyInverse(y)

Author:
mballesteros

Field Summary
 
Fields inherited from class net.sf.jec.Operator
argOps, nestedOp, showFunctionString
 
Constructor Summary
InvertibleOperator()
          Creates a new operator that nest another operator
InvertibleOperator(Operator nestedOp)
          Creates a new operator that nest another operator
 
Method Summary
 void applyInverse(java.lang.Object rootCtx, java.lang.Object ctx, java.lang.Object value)
           
protected abstract  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.
 
Methods inherited from class net.sf.jec.Operator
apply, directMap, setArgumentOperators, setNestedOperator, toExpressionString, toFunctionString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InvertibleOperator

public InvertibleOperator()
Creates a new operator that nest another operator


InvertibleOperator

public InvertibleOperator(Operator nestedOp)
Creates a new operator that nest another operator

Method Detail

applyInverse

public final void applyInverse(java.lang.Object rootCtx,
                               java.lang.Object ctx,
                               java.lang.Object value)
                        throws EvaluationException
Throws:
EvaluationException

inverseMap

protected abstract void inverseMap(java.lang.Object rootCtx,
                                   java.lang.Object ctx,
                                   java.lang.Object value)
                            throws EvaluationException
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.

Parameters:
rootCtx - The root context, needed for operators that require expression evaluation from root point. Example: Indexer operators
ctx - The current context where the operator will work over
value - The value to set.
Throws:
EvaluationException


Copyright © 2003 SourceForge. All Rights Reserved.