|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jcoderz.commons.util.SerializableIterator
public final class SerializableIterator
Provides a serializable iterator over a collection (which may
be either a Collection or an array of Objects. The
remove() operation is not supported in this implementation.
NOTE: It is the caller's responsibility to ensure that all objects in
the arguments passed to the factory methods are serializable. The
implementation does not check this.
| Method Summary | |
|---|---|
static SerializableIterator |
fromArray(Object[] array)
Construct a new iterator from the given array. |
static SerializableIterator |
fromCollection(Collection collection)
Construct a new iterator from the given collection. |
boolean |
hasNext()
|
Object |
next()
|
void |
remove()
This operation is not supported in this implementation. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static SerializableIterator fromCollection(Collection collection)
collection - the collection for which an iterator should be
created. All elements in the collection must be serializable.
public static SerializableIterator fromArray(Object[] array)
array - the object array for which an iterator should be
created. All elements in the array must be serializable.
public void remove()
throws UnsupportedOperationException
remove in interface IteratorUnsupportedOperationException - whenever this method is called.Iterator.remove()public boolean hasNext()
hasNext in interface Iteratorpublic Object next()
next in interface Iteratorpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||