org.rhq.enterprise.server.sync.exporters
Class AbstractDelegatingExportingIterator<T,E>

java.lang.Object
  extended by org.rhq.enterprise.server.sync.exporters.AbstractDelegatingExportingIterator<T,E>
All Implemented Interfaces:
Iterator<T>, ExportingIterator<T>
Direct Known Subclasses:
JAXBExportingIterator

public abstract class AbstractDelegatingExportingIterator<T,E>
extends Object
implements ExportingIterator<T>

An abstract base class that delegates the Iterator functionality to a provided "ordinary" iterator while leaving the exporting functionality to the subclasses.

Author:
Lukas Krejci

Constructor Summary
AbstractDelegatingExportingIterator(Iterator<E> wrapped)
           
 
Method Summary
protected abstract  T convert(E object)
           
protected  T getCurrent()
           
 boolean hasNext()
           
 T next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.rhq.enterprise.server.sync.exporters.ExportingIterator
export, getNotes
 

Constructor Detail

AbstractDelegatingExportingIterator

public AbstractDelegatingExportingIterator(Iterator<E> wrapped)
Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator<T>

next

public T next()
Specified by:
next in interface Iterator<T>

remove

public void remove()
Specified by:
remove in interface Iterator<T>

getCurrent

protected T getCurrent()

convert

protected abstract T convert(E object)


Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.