org.pf.tools.cda.base.model.util
Class ContainerFilteringIterator<TContainer extends GenericClassContainer>

java.lang.Object
  extended by org.pf.tools.cda.base.model.util.ContainerFilteringIterator<TContainer>
All Implemented Interfaces:
java.util.Iterator<TContainer>

public class ContainerFilteringIterator<TContainer extends GenericClassContainer>
extends java.lang.Object
implements java.util.Iterator<TContainer>

An instance of this class allows to iterate over a given array of GenericClassContainer objects but returning only those that are of a specified subclass.

Version:
1.0
Author:
M.Duchrow

Constructor Summary
ContainerFilteringIterator(GenericClassContainer[] containers, java.lang.Class<TContainer> expectedType)
           
 
Method Summary
 boolean hasNext()
           
 TContainer next()
           
 void remove()
          Not supported.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContainerFilteringIterator

public ContainerFilteringIterator(GenericClassContainer[] containers,
                                  java.lang.Class<TContainer> expectedType)
Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator<TContainer extends GenericClassContainer>

next

public TContainer next()
Specified by:
next in interface java.util.Iterator<TContainer extends GenericClassContainer>

remove

public void remove()
Not supported. Does nothing.

Specified by:
remove in interface java.util.Iterator<TContainer extends GenericClassContainer>