org.eclipse.birt.report.model.api
Class SortedSlotIterator

java.lang.Object
  extended by org.eclipse.birt.report.model.api.SortedSlotIterator
All Implemented Interfaces:
java.util.Iterator

public class SortedSlotIterator
extends java.lang.Object
implements java.util.Iterator

An sorted iterator over the elements in a slot. Each call to getNext( ) returns a handle of type DesignElementHandle. The elements in the list are sorted on the display name of the element.


Field Summary
protected  java.util.List list
          Internal list for sorted.
protected  int posn
          Current iteration position.
protected  SlotHandle slotHandle
          Handle to the slot over which to iterate.
 
Constructor Summary
SortedSlotIterator(SlotHandle handle)
          Constructs a sorted slot iterator with the given slot handle.
 
Method Summary
 boolean hasNext()
           
 java.lang.Object next()
          Returns a handle to the next content element.
 void remove()
          Removes the element at the current iterator position.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

slotHandle

protected final SlotHandle slotHandle
Handle to the slot over which to iterate.


list

protected java.util.List list
Internal list for sorted.


posn

protected int posn
Current iteration position.

Constructor Detail

SortedSlotIterator

public SortedSlotIterator(SlotHandle handle)
Constructs a sorted slot iterator with the given slot handle.

Parameters:
handle - handle to the slot over which to iterate
Method Detail

remove

public void remove()
Removes the element at the current iterator position.

Specified by:
remove in interface java.util.Iterator

hasNext

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

next

public java.lang.Object next()
Returns a handle to the next content element. The handle is one of the various element classes derived from DesignElementHandle.

Specified by:
next in interface java.util.Iterator
Returns:
a handle to the next content element.


Copyright © 2008 Actuate Corp. All rights reserved.