org.japano.pagenode.jstl.core
Class ForTokens

java.lang.Object
  extended by org.japano.PageNode
      extended by org.japano.pagenode.jstl.core.ForEach
          extended by org.japano.pagenode.jstl.core.ForTokens
All Implemented Interfaces:
javax.servlet.jsp.jstl.core.LoopTagStatus

public class ForTokens
extends ForEach

Iterates over tokens, separated by the supplied delimeters

Version:
$Id: ForTokens.java,v 1.5 2005/09/27 21:30:51 fforw Exp $ SourceForge.net Logo
Author:
Sven Helmberger ( sven dot helmberger at gmx dot de )

Nested Class Summary
 
Nested classes/interfaces inherited from class org.japano.PageNode
PageNode.Output
 
Field Summary
 
Fields inherited from class org.japano.pagenode.jstl.core.ForEach
begin, beginSet, count, current, delimiter, end, endOfRun, endSet, first, iBegin, iEnd, index, iStep, items, itemsSet, last, step, var, varStatus
 
Fields inherited from class org.japano.PageNode
children, context, EMPTY, nodeId, parent
 
Constructor Summary
ForTokens()
           
 
Method Summary
 void generate(Buffer out)
          Generates this node The base implementation just calls PageNode.generateChildren(Buffer)
 java.lang.Integer getBegin()
          Returns the begin value.
 int getCount()
          Returns the current count.
 java.lang.Object getCurrent()
          Returns the current object.
 java.lang.Integer getEnd()
          Returns the end value.
 int getIndex()
          Returns the current index.
 java.lang.Integer getStep()
          Returns the step value.
 boolean isFirst()
          Returns true if the current iteration is the first.
 boolean isLast()
          Returns true if the current iteration is the last.
 void setBegin(int begin)
          If items specified: Iteration begins at the item located at the specified index.
 void setDelimiter(java.lang.String delimiter)
          The set of delimiters (the characters that separate the tokens in the string).
 void setEnd(int end)
          If items specified: Iteration ends at the item located at the specified index (inclusive).
 void setItems(java.lang.String items)
          String of tokens to iterate over.
 void setStep(int step)
          Iteration will only process every step items of the collection, starting with the first one.
 void setVar(java.lang.String var)
          Name of the exported scoped variable for the current item of the iteration.
 void setVarStatus(java.lang.String varStatus)
          Name of the exported scoped variable for the status of the iteration.
 
Methods inherited from class org.japano.pagenode.jstl.core.ForEach
generateChildren, iterate, setItems
 
Methods inherited from class org.japano.PageNode
findChildren, findParent, findRootNode, getChildren, getContext, getNodeId, getParent, init, recInit, release, setChildren, setContext, setNodeId, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ForTokens

public ForTokens()
Method Detail

setVarStatus

public void setVarStatus(java.lang.String varStatus)
Name of the exported scoped variable for the status of the iteration. Object exported is of type javax.servlet.jsp.jstl.core.LoopTagStatus. This scoped variable has nested visibility.

Overrides:
setVarStatus in class ForEach

setVar

public void setVar(java.lang.String var)
Name of the exported scoped variable for the current item of the iteration. This scoped variable has nested visibility. Its type depends on the object of the underlying collection.

Overrides:
setVar in class ForEach

setItems

public void setItems(java.lang.String items)
String of tokens to iterate over.

Parameters:
items - New value of property items.

setDelimiter

public void setDelimiter(java.lang.String delimiter)
The set of delimiters (the characters that separate the tokens in the string).

Parameters:
items - New value of property items.

setBegin

public void setBegin(int begin)
If items specified: Iteration begins at the item located at the specified index. First item of the collection has index 0. If items not specified: Iteration begins with index set at the value specified.

Overrides:
setBegin in class ForEach

setEnd

public void setEnd(int end)
If items specified: Iteration ends at the item located at the specified index (inclusive).
If items not specified: Iteration ends when index reaches the value specified.

Overrides:
setEnd in class ForEach

setStep

public void setStep(int step)
Iteration will only process every step items of the collection, starting with the first one.

Overrides:
setStep in class ForEach

getCurrent

public java.lang.Object getCurrent()
Returns the current object.

Specified by:
getCurrent in interface javax.servlet.jsp.jstl.core.LoopTagStatus
Overrides:
getCurrent in class ForEach

getIndex

public int getIndex()
Returns the current index.

Specified by:
getIndex in interface javax.servlet.jsp.jstl.core.LoopTagStatus
Overrides:
getIndex in class ForEach

getCount

public int getCount()
Returns the current count. The count starts at 1 and increases with every iteration by 1 regardless of step value.

Specified by:
getCount in interface javax.servlet.jsp.jstl.core.LoopTagStatus
Overrides:
getCount in class ForEach

getStep

public java.lang.Integer getStep()
Returns the step value.

Specified by:
getStep in interface javax.servlet.jsp.jstl.core.LoopTagStatus
Overrides:
getStep in class ForEach

isLast

public boolean isLast()
Returns true if the current iteration is the last.

Specified by:
isLast in interface javax.servlet.jsp.jstl.core.LoopTagStatus
Overrides:
isLast in class ForEach

isFirst

public boolean isFirst()
Returns true if the current iteration is the first.

Specified by:
isFirst in interface javax.servlet.jsp.jstl.core.LoopTagStatus
Overrides:
isFirst in class ForEach

getEnd

public java.lang.Integer getEnd()
Returns the end value.

Specified by:
getEnd in interface javax.servlet.jsp.jstl.core.LoopTagStatus
Overrides:
getEnd in class ForEach

getBegin

public java.lang.Integer getBegin()
Returns the begin value.

Specified by:
getBegin in interface javax.servlet.jsp.jstl.core.LoopTagStatus
Overrides:
getBegin in class ForEach

generate

public void generate(Buffer out)
Description copied from class: PageNode
Generates this node The base implementation just calls PageNode.generateChildren(Buffer)

Overrides:
generate in class ForEach