Interface RemoteIterator<E>

  • Type Parameters:
    E - the type of elements returned by this iterator
    All Superinterfaces:
    java.rmi.Remote

    public interface RemoteIterator<E>
    extends java.rmi.Remote
    A RemoteIterator has the same interface as an Iterator but since all Remote objetcs must throw a RemoteException every method does exactly that. A RemoteIterator can be wrapped in a ApiIterator to get a conventional Iterator.
    Author:
    Copyright (c) 2014-2024 Piketec GmbH - MIT License (MIT) - All rights reserved
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean hasNext()
      Returns true if the iteration has more elements, false otherwise.
      E next()
      Get the next element of the iteration.
      void remove()
      Removes the last element returned by this iterator from the underlying collection (optional operation).
    • Method Detail

      • hasNext

        boolean hasNext()
                 throws java.rmi.RemoteException
        Returns true if the iteration has more elements, false otherwise.
        Returns:
        true if the iteration has more elements, false otherwise.
        Throws:
        java.rmi.RemoteException - remote communication problem
        See Also:
        Iterator.hasNext()
      • next

        E next()
        throws java.rmi.RemoteException
        Get the next element of the iteration.
        Returns:
        the next element of the iteration.
        Throws:
        java.rmi.RemoteException - remote communication problem
        See Also:
        Iterator.next()
      • remove

        void remove()
             throws java.rmi.RemoteException
        Removes the last element returned by this iterator from the underlying collection (optional operation).
        Throws:
        java.rmi.RemoteException - remote communication problem
        See Also:
        Iterator.remove()