org.apache.struts2.util
Class IteratorGenerator

java.lang.Object
  extended by org.apache.struts2.util.IteratorGenerator
All Implemented Interfaces:
Action, java.util.Iterator

public class IteratorGenerator
extends java.lang.Object
implements java.util.Iterator, Action

A bean that generates an iterator filled with a given object depending on the count, separator and converter defined. It is being used by IteratorGeneratorTag.


Nested Class Summary
static interface IteratorGenerator.Converter
          Interface for converting each separated token into an Object of choice.
 
Field Summary
 
Fields inherited from interface com.opensymphony.xwork2.Action
ERROR, INPUT, LOGIN, NONE, SUCCESS
 
Constructor Summary
IteratorGenerator()
           
 
Method Summary
 java.lang.String execute()
           
 boolean getHasNext()
           
 java.lang.Object getNext()
           
 boolean hasNext()
           
 java.lang.Object next()
           
 void remove()
           
 void setConverter(IteratorGenerator.Converter aConverter)
           
 void setCount(int aCount)
           
 void setSeparator(java.lang.String aChar)
           
 void setValues(java.lang.Object aValue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IteratorGenerator

public IteratorGenerator()
Method Detail

setCount

public void setCount(int aCount)

getHasNext

public boolean getHasNext()

getNext

public java.lang.Object getNext()

setSeparator

public void setSeparator(java.lang.String aChar)

setConverter

public void setConverter(IteratorGenerator.Converter aConverter)

setValues

public void setValues(java.lang.Object aValue)

execute

public java.lang.String execute()
Specified by:
execute in interface Action

hasNext

public boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator

next

public java.lang.Object next()
Specified by:
next in interface java.util.Iterator

remove

public void remove()
Specified by:
remove in interface java.util.Iterator


Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.