net.sf.morph.reflect.support
Class ObjectIterator

java.lang.Object
  extended by net.sf.morph.reflect.support.ObjectIterator
All Implemented Interfaces:
java.util.Iterator

public class ObjectIterator
extends java.lang.Object
implements java.util.Iterator

Exposes an object as an iterator by treating the object as a collection with one element. That means hasNext will return true before next has been called, and will return false after it has been called.

Since:
Jan 8, 2005
Author:
Matt Sgarlata

Constructor Summary
ObjectIterator(java.lang.Object object)
           
 
Method Summary
 boolean hasNext()
           
 java.lang.Object next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectIterator

public ObjectIterator(java.lang.Object object)
Method Detail

remove

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

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


Copyright © 2004-2008.