FileDocCategorySizeDatePackage
DistributedIteratorImpl.javaAPI DocExample1672Mon Aug 28 20:57:14 BST 2000com.imaginary.util

DistributedIteratorImpl

public class DistributedIteratorImpl extends UnicastRemoteObject implements DistributedIterator
Implements the DistributedIterator interface by referencing a local Iterator.
Last modified $Date: 1999/11/06 18:38:04 $
version
$Revision: 1.1.1.1 $
author
George Reese (borg@imaginary.com)

Fields Summary
private Iterator
source
The local iterator that serves as the source for the elements of the distributed iterator.
Constructors Summary
public DistributedIteratorImpl(Iterator src)
Constructs a new DistributedIteratorImpl using the specified local iterator as a data source.

param
src the local iterator
throws
java.rmi.RemoteException could not export the iterator


                                  
         
        super();
        source = src;
    
Methods Summary
public booleanhasNext()

return
true if more elements are available in the iterator

        return source.hasNext();
    
public java.lang.Objectnext()

return
the next element in the iterator

        Object ob = source.next();

        return ob;
        //return source.next();
    
public voidremove()
This operation is unsupported in this implementation.

throws
java.lang.UnsupportedOperationException always thrown

        throw new UnsupportedOperationException("Cannot remove from a " +
                                                "distributed iterator.");