gov.sandia.cognition.collection
Class MultiIterator<EntryType>

java.lang.Object
  extended by gov.sandia.cognition.collection.MultiIterator<EntryType>
Type Parameters:
EntryType - The type for an entry in the collection.
All Implemented Interfaces:
Serializable, Iterator<EntryType>

@CodeReviews(reviews={@CodeReview(reviewer="Kevin R. Dixon",date="2008-02-08",changesNeeded=false,comments="Interface looks fine."),@CodeReview(reviewer="Kevin R. Dixon",date="2006-07-18",changesNeeded=true,comments="Non-standard use of direct-member access, instead of getters and setters. Please review.",response=@CodeReviewResponse(respondent="Justin Basilico",date="2006-08-17",moreChangesNeeded=false,comments="Updated comments to indicate that it does not use getters"))})
public class MultiIterator<EntryType>
extends Object
implements Iterator<EntryType>, Serializable

The MultiIterator class implements an iterator that iterates over a bunch of internal iterators, exhausting one before moving to the next.

Since:
1.0
Author:
Justin Basilico
See Also:
Serialized Form

Constructor Summary
MultiIterator(Collection<? extends Iterable<EntryType>> iterables)
          Creates a new instance of MultiIterator.
 
Method Summary
 boolean hasNext()
          
 EntryType next()
          
 void remove()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiIterator

public MultiIterator(Collection<? extends Iterable<EntryType>> iterables)
Creates a new instance of MultiIterator.

Parameters:
iterables - The collection of iterables to iterate using.
Method Detail

hasNext

public boolean hasNext()

Specified by:
hasNext in interface Iterator<EntryType>
Returns:

next

public EntryType next()

Specified by:
next in interface Iterator<EntryType>
Returns:

remove

public void remove()

Specified by:
remove in interface Iterator<EntryType>