org.apache.velocity.runtime.directive
Class Foreach
- Cloneable, DirectiveConstants
Foreach directive used for moving through arrays,
or objects that provide an Iterator.
Version:
- Jason van Zyl
- Geir Magnusson Jr.
private int | counterInitialValue - What value to start the loop counter at.
|
private String | counterName - The name of the variable to use when placing
the counter value into the context.
|
private String | elementKey - The reference name used to access each
of the elements in the list object.
|
protected Info | uberInfo - immutable, so create in init
|
counterInitialValue
private int counterInitialValue
What value to start the loop counter at.
counterName
private String counterName
The name of the variable to use when placing
the counter value into the context. Right
now the default is $velocityCount.
elementKey
private String elementKey
The reference name used to access each
of the elements in the list object. It
is the $item in the following:
#foreach ($item in $list)
This can be used class wide because
it is immutable.
uberInfo
protected Info uberInfo
immutable, so create in init
getName
public String getName()
Return name of this directive.
- getName in interface Directive
getType
public int getType()
Return type of this directive.
- getType in interface Directive
Copyright B) 2002 Apache Software Foundation. All Rights Reserved.