Class ReadOnlyIteratorAdapter<E>

java.lang.Object
com.gigaspaces.internal.utils.collections.ReadOnlyIteratorAdapter<E>
All Implemented Interfaces:
ReadOnlyIterator<E>

public class ReadOnlyIteratorAdapter<E> extends Object implements ReadOnlyIterator<E>
  • Constructor Details

    • ReadOnlyIteratorAdapter

      public ReadOnlyIteratorAdapter(Iterator<E> iterator)
  • Method Details

    • hasNext

      public boolean hasNext()
      Description copied from interface: ReadOnlyIterator
      Returns true if the iteration has more elements. (In other words, returns true if next would return an element rather than throwing an exception.)
      Specified by:
      hasNext in interface ReadOnlyIterator<E>
      Returns:
      true if the iterator has more elements.
    • next

      public E next()
      Description copied from interface: ReadOnlyIterator
      Returns the next element in the iteration. Calling this method repeatedly until the ReadOnlyIterator.hasNext() method returns false will return each element in the underlying collection exactly once.
      Specified by:
      next in interface ReadOnlyIterator<E>
      Returns:
      the next element in the iteration.
    • close

      public void close()
      Description copied from interface: ReadOnlyIterator
      Closes the iterator
      Specified by:
      close in interface ReadOnlyIterator<E>