org.quattor.pan.dml.operators
Class Foreach

java.lang.Object
  extended by org.quattor.pan.dml.AbstractOperation
      extended by org.quattor.pan.dml.operators.Foreach
All Implemented Interfaces:
Operation

public final class Foreach
extends AbstractOperation

Implements a foreach loop that allows iteration over all elements in a resource without having to explicitly create an iterator. Structural changes to the resource during the iteration are not permitted.

Author:
loomis

Field Summary
 
Fields inherited from class org.quattor.pan.dml.AbstractOperation
ops, sourceRange
 
Constructor Summary
Foreach(SourceRange sourceRange, Operation... ops)
           
 
Method Summary
 Element execute(Context context)
          Execute this operation within the given context.
 
Methods inherited from class org.quattor.pan.dml.AbstractOperation
calculateArgs, calculateTerms, checkInvalidSelfContext, checkRestrictedContext, getOperations, getSourceRange, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Foreach

public Foreach(SourceRange sourceRange,
               Operation... ops)
Method Detail

execute

public Element execute(Context context)
Description copied from interface: Operation
Execute this operation within the given context. If an error occurs, an EvaluationException will be thrown with the details.

Specified by:
execute in interface Operation
Specified by:
execute in class AbstractOperation
Parameters:
context - evaluation context for the statement
Returns:
Element produced by running operation


Copyright © 2011 Quattor. All Rights Reserved.