IteratorFactory Class
- public class IteratorFactory
extends Object
IteratorFactory
provides a way to create an
Iterator
for different kinds of objects. The supported types
are:
java.util.Iterator
java.util.Collection
java.util.Map
javax.sql.RowSet
java.util.Enumeration
XMLRuntime.XMLList
XMLRuntime.XML
- Any Java Object array
If a java.util.Iterator
is supplied, the
Iterator
will simply be returned to the caller.
If an object type not listed above is supplied the object will be wrapped in
an iterator that has a single item, the provided object.
-
Hierarchy
-
Object
IteratorFactory
Methods from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EMPTY_ITERATOR
public static final Iterator
EMPTY_ITERATOR
IteratorFactory
public IteratorFactory()
makeIterator(Object) Method
public static Iterator
makeIterator(Object
object)
throws IteratorFactoryException
Create a new Iterator
for the supplied object. If the
passed object is null, this method will return null;
Parameters
-
object
- the object to build an iterator from
Returns
- an iterator for the supplied object or
null
Exceptions
-
IteratorFactoryException