Orbital library

orbital.util
Class DelegateIterator

java.lang.Object
  extended by orbital.util.DelegateIterator
All Implemented Interfaces:
java.io.Serializable, java.util.Iterator
Direct Known Subclasses:
DelegateListIterator

public class DelegateIterator
extends java.lang.Object
implements java.util.Iterator, java.io.Serializable

A DelegateIterator that works as a delegator to iterators. It implements the java.util.Iterator interface itself, and so a DelegateIterator is an iterator delegating to a specified implementation Iterator.

Author:
André Platzer
See Also:
Iterator, Serialized Form
Structure:
delegate delegatee:java.util.Iterator, implements java.util.Iterator, implements java.io.Serializable

Constructor Summary
protected DelegateIterator(java.util.Iterator delegatee)
          Extend to create an Iterator delegating to an implementation Iterator.
 
Method Summary
protected  java.util.Iterator getDelegatee()
          Get the delegatee Iterator to which operations are delegated.
 boolean hasNext()
           
 java.lang.Object next()
           
 void remove()
           
protected  void setDelegatee(java.util.Iterator delegatee)
          Set the delegatee Iterator to which operations are delegated.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelegateIterator

protected DelegateIterator(java.util.Iterator delegatee)
Extend to create an Iterator delegating to an implementation Iterator.

Parameters:
delegatee - the implementation-Iterator to that Iterator operations are delegated.
Method Detail

getDelegatee

protected java.util.Iterator getDelegatee()
Get the delegatee Iterator to which operations are delegated.

Returns:
the implementation-Iterator that Iterator operations are delegated to.

setDelegatee

protected void setDelegatee(java.util.Iterator delegatee)
Set the delegatee Iterator to which operations are delegated.

Parameters:
delegatee - the implementation-Iterator that Iterator operations are delegated to.

hasNext

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

next

public java.lang.Object next()
Specified by:
next in interface java.util.Iterator

remove

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

Orbital library
1.3.0: 11 Apr 2009

Copyright © 1996-2009 André Platzer
All Rights Reserved.