Class SerializableIteratorImpl<T>

  • Type Parameters:
    T - The type of the instances managed by the Iterator.
    All Implemented Interfaces:
    java.io.Serializable, java.util.Iterator<T>


    public class SerializableIteratorImpl<T>
    extends java.lang.Object
    implements java.util.Iterator<T>, java.io.Serializable
    Makes the wrapped Iterator serializable, else passing Iterator instances would cause an NotSerializableException or similar. Use the SerializeUtility.toSerializable(Object) to let you help to get serializable instances.
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean hasNext​()
      T next​()
      void remove​()
      • Methods inherited from interface java.util.Iterator

        forEachRemaining
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SerializableIteratorImpl

        public SerializableIteratorImpl​()
        Instantiates a new serializable iterator impl.
      • SerializableIteratorImpl

        public SerializableIteratorImpl​(java.util.Iterator<T> aIterator)
        Instantiates a new serializable iterator impl.
        Parameters:
        aIterator - the iterator
    • Method Detail

      • hasNext

        public boolean hasNext​()
        Specified by:
        hasNext in interface java.util.Iterator<T>
      • next

        public T next​()
        Specified by:
        next in interface java.util.Iterator<T>
      • remove

        public void remove​()
        Specified by:
        remove in interface java.util.Iterator<T>