com.ebay.carad.os.vitalsigns
Class ReportContainerIterator

java.lang.Object
  extended by com.ebay.carad.os.vitalsigns.ReportContainerIterator

public class ReportContainerIterator
extends java.lang.Object

An iterator that goes over an iterator containing IDashboardReportContainer objects, and explodes them to expose an iterator over IDashboardReport objects. Does not implement Iterator because it doesn't support remove, and doesn't return Object.

Version:
$Id$
Author:
Jeremy Kraybill, Jeremy Thomerson

Field Summary
private  java.util.Iterator currentIterator
          The current iterator over the current IDashboardReportContainer.
private  java.util.Iterator myIterator
          The wrapped list iterator, must be all IDashboardReportContainer objects.
 
Constructor Summary
ReportContainerIterator(java.util.Collection col)
          Basic constructor.
 
Method Summary
 boolean hasNext()
          Returns true if the iteration has more elements.
private  void moveToNextActive()
          Ensures our current iterator has elements to offer, or that we are at the end of the line.
 IDashboardReport next()
          Returns the next IDashboardReport in the iteration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

myIterator

private final java.util.Iterator myIterator
The wrapped list iterator, must be all IDashboardReportContainer objects.


currentIterator

private java.util.Iterator currentIterator
The current iterator over the current IDashboardReportContainer.

Constructor Detail

ReportContainerIterator

public ReportContainerIterator(java.util.Collection col)
Basic constructor.

Parameters:
col - a collection of IDashboardReportContainer objects.
Method Detail

hasNext

public boolean hasNext()
Returns true if the iteration has more elements. (In other words, returns true if next would return an element rather than throwing an exception.)

Returns:
true if the iterator has more elements.

next

public IDashboardReport next()
Returns the next IDashboardReport in the iteration.

Returns:
the next element in the iteration.

moveToNextActive

private void moveToNextActive()
Ensures our current iterator has elements to offer, or that we are at the end of the line.



Copyright © 2004-2009. All Rights Reserved.