net.sf.jec.namedop
Class MaxOperator

java.lang.Object
  extended bynet.sf.jec.Operator
      extended bynet.sf.jec.namedop.GroupOperator
          extended bynet.sf.jec.namedop.MaxOperator

public class MaxOperator
extends GroupOperator

MaxOperator acts over a collection of elements, applying its argument operator to each element, and returning the maximum result value.

Author:
mballesteros

Field Summary
 
Fields inherited from class net.sf.jec.Operator
argOps, nestedOp, showFunctionString
 
Constructor Summary
MaxOperator()
          Creates a new MaxOperator
 
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
 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.namedop.GroupOperator
applyToGroup
 
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

MaxOperator

public MaxOperator()
Creates a new MaxOperator

Method Detail

toFunctionString

public java.lang.String toFunctionString()
Returns a function representation String for this operator

Specified by:
toFunctionString in class Operator
Returns:
a String representation of this operator.

toExpressionString

public java.lang.String toExpressionString()
Returns an expression String representation for this operator

Specified by:
toExpressionString in class Operator
Returns:
a String representation of this operator.

directMap

protected java.lang.Object directMap(java.lang.Object rootCtx,
                                     java.lang.Object ctx)
                              throws EvaluationException
Returns the associated value to the given context and root context

Specified by:
directMap in class Operator
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
Returns:
the result Object of applying THIS operator to the given context.
Throws:
EvaluationException - when something goes wrong applying this operator.


Copyright © 2003 SourceForge. All Rights Reserved.