org.openanzo.util
Class NullIterator<T>

java.lang.Object
  extended by org.openanzo.util.NullIterator<T>
Type Parameters:
T - Type of object within iterator
All Implemented Interfaces:
java.util.Iterator<T>, MutableIterator<T>

public class NullIterator<T>
extends java.lang.Object
implements MutableIterator<T>

Null implementation of MutableIterator for returning an empty iterator

Author:
Lee Feigenbaum ( feigenbl@us.ibm.com )

Constructor Summary
NullIterator()
           
 
Method Summary
 boolean hasNext()
           
 T next()
           
 void remove()
           
 void set(T x)
          Replaces the last element accessed via the iterator (usually via .next()) with newVal.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullIterator

public NullIterator()
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>

set

public void set(T x)
Description copied from interface: MutableIterator
Replaces the last element accessed via the iterator (usually via .next()) with newVal.

Specified by:
set in interface MutableIterator<T>
Parameters:
x - The new value to replace for the previously accessed element in the iteration.


Copyright © 2007 Cambridge Semantics Inc.. All Rights Reserved.