org.apache.struts2.util
Class SortIteratorFilter

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

public class SortIteratorFilter
extends IteratorFilterSupport
implements Iterator, Action

A bean that takes a source and comparator then attempt to sort the source utilizing the comparator. It is being used in SortIteratorTag.

See Also:
SortIteratorTag

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.struts2.util.IteratorFilterSupport
IteratorFilterSupport.EnumerationIterator
 
Field Summary
(package private)  Comparator comparator
           
(package private)  Iterator iterator
           
(package private)  List list
           
(package private)  Object source
           
 
Fields inherited from interface com.opensymphony.xwork2.Action
ERROR, INPUT, LOGIN, NONE, SUCCESS
 
Constructor Summary
SortIteratorFilter()
           
 
Method Summary
 String execute()
          Where the logic of the action is executed.
 List getList()
           
 boolean hasNext()
           
 Object next()
           
 void remove()
           
 void setComparator(Comparator aComparator)
           
 void setSource(Object anIterator)
           
 
Methods inherited from class org.apache.struts2.util.IteratorFilterSupport
getIterator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

comparator

Comparator comparator

iterator

Iterator iterator

list

List list

source

Object source
Constructor Detail

SortIteratorFilter

public SortIteratorFilter()
Method Detail

setComparator

public void setComparator(Comparator aComparator)

getList

public List getList()

setSource

public void setSource(Object anIterator)

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


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