Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.struts2.util
Class IteratorGenerator

    java.lang.Object
      org.apache.struts2.util.IteratorGenerator

All Implemented Interfaces:
  Action, Iterator

    public class IteratorGenerator

extends Object
implements 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
`private static Log` | `_log`
`(package private) IteratorGenerator.Converter` | `converter`
`(package private) int` | `count`
`(package private) int` | `currentCount`
`(package private) String` | `separator`
`(package private) Object` | `value`
`(package private) List` | `values`

Fields inherited from interface com.opensymphony.xwork2.Action
`ERROR, INPUT, LOGIN, NONE, SUCCESS`

Constructor Summary
`IteratorGenerator()`

Method Summary
`String` | `execute()` Where the logic of the action is executed.
`boolean` | `getHasNext()`
`Object` | `getNext()`
`boolean` | `hasNext()`
`Object` | `next()`
`void` | `remove()`
`void` | `setConverter(IteratorGenerator.Converter aConverter)`
`void` | `setCount(int aCount)`
`void` | `setSeparator(String aChar)`
`void` | `setValues(Object aValue)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### _log

    private static final Log _log

### values

    List values

### value

    Object value

### separator

    String separator

### converter

    IteratorGenerator.Converter converter

### count

    int count

### currentCount

    int currentCount

Constructor Detail

### IteratorGenerator

    public IteratorGenerator()

Method Detail

### setCount

    public void setCount(int aCount)

### getHasNext

    public boolean getHasNext()

### getNext

    public Object getNext()

### setSeparator

    public void setSeparator(String aChar)

### setConverter

    public void setConverter(IteratorGenerator.Converter aConverter)

### setValues

    public void setValues(Object aValue)

### execute

    public String execute()

  Description copied from interface: `Action`
  Where the logic of the action is executed.

  Specified by:
    `execute` in interface `Action`
  Returns:
    a string representing the logical result of the execution. See constants in this interface for a list of standard result values.

### hasNext

    public boolean hasNext()

  Specified by:
    `hasNext` in interface `Iterator`

### next

    public Object next()

  Specified by:
    `next` in interface `Iterator`

### remove

    public void remove()

  Specified by:
    `remove` in interface `Iterator`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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