| java.lang.Object com.go.tea.parsetree.Node com.go.tea.parsetree.Statement com.go.tea.parsetree.ForeachStatement
ForeachStatement | public class ForeachStatement extends Statement (Code) | | A ForeachStatement iterates over the values of an array or a Collection,
storing each value in a variable, allowing a statement or statements to
operate on each. Reverse looping is supported for arrays and Lists.
Because Collections don't know the type of elements they
contain (they only know that they are Objects), the only operations allowed
on the loop variable are those that are defined for Object.
Collection class can be subclassed to contain a special
field that defines the element type. The field must have the following
signature: public static final Class ELEMENT_TYPE
author: Brian S O'Neill version: 30 , 9/07/00 |
getEndRange | public Expression getEndRange()(Code) | | Returns null if this foreach statement iterates over an array/collection
instead of an integer range of values.
|
getInitializer | public Statement getInitializer()(Code) | | Initializer is a section of code that executes before the loop is
entered. By default, it is null. A type checker may define an
initializer.
|
isReverse | public boolean isReverse()(Code) | | |
|
|