Rule Execution Server API

ilog.rules.factory
Class IlrForeachStatement

java.lang.Object
  extended by ilog.rules.factory.IlrBaseStatement
      extended by ilog.rules.factory.IlrStatementBlock
          extended by ilog.rules.factory.IlrForeachStatement
All Implemented Interfaces:
ilog.rules.factory.IlrSourceElement, IlrStatement, Serializable

public class IlrForeachStatement
extends IlrStatementBlock

This class represents a foreach instruction of the rule language.

Warning: Serialized objects of this class will not be compatible with future releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of IBM Decision Server.

See Also:
Serialized Form

Constructor Summary
IlrForeachStatement(IlrType type, String name, IlrValue collection, IlrStatement[] stats)
          Constructs a foreach instruction.
 
Method Summary
 Object exploreStatement(IlrFactoryExplorer explorer)
          Explores this method call as a statement using a factory explorer.
 IlrValue getCollection()
          Returns the collection.
 String getName()
          Returns the name of the local variable declared in the foreach.
 IlrType getXOMType()
          Returns the type of the local variable declared in the foreach.
 
Methods inherited from class ilog.rules.factory.IlrStatementBlock
addStatement, enumerateStatements, getStatementCount, getStatements, removeStatement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlrForeachStatement

public IlrForeachStatement(IlrType type,
                           String name,
                           IlrValue collection,
                           IlrStatement[] stats)
Constructs a foreach instruction.

Parameters:
type - The type of the foreach local variable.
name - The name of the foreach local variable.
collection - The collection on which to iterate.
stats - The block of instructions of the foreach statement.
Method Detail

exploreStatement

public Object exploreStatement(IlrFactoryExplorer explorer)
Explores this method call as a statement using a factory explorer.

Parameters:
explorer - The factory explorer.
Returns:
An object, the result of the exploration, or null if the method does not return a value.

getName

public String getName()
Returns the name of the local variable declared in the foreach.

Returns:
The name of the local variable.

getCollection

public IlrValue getCollection()
Returns the collection.

Returns:
An IlrValue representing the collection.

getXOMType

public IlrType getXOMType()
Returns the type of the local variable declared in the foreach.

Returns:
An IlrType representing the type of the local variable.

Rule Execution Server API

© Copyright IBM Corp. 1987, 2013