com.partnersoft.data
Class DelegatingIterator<T>

java.lang.Object
  extended by com.partnersoft.data.DelegatingIterator<T>
All Implemented Interfaces:
java.util.Iterator<T>

public class DelegatingIterator<T>
extends java.lang.Object
implements java.util.Iterator<T>

A delegating wrapper implementation of Iterator. Useful for when you want to layer other functionality or translate on the fly.

Copyright 2009 Partner Software, Inc.

Version:
$Id: ArrayIterator.java 1626 2008-11-20 15:06:10Z paul $
Author:
Paul Reavis

Field Summary
protected  T currentValue
           
protected  java.util.Iterator<T> delegate
           
 
Constructor Summary
DelegatingIterator(java.util.Iterator<T> delegate)
           
 
Method Summary
 boolean hasNext()
           
 T next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

delegate

protected java.util.Iterator<T> delegate

currentValue

protected T currentValue
Constructor Detail

DelegatingIterator

public DelegatingIterator(java.util.Iterator<T> delegate)
Method Detail

hasNext

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

next

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

remove

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