Class OneElementIterator<T>

  • Type Parameters:
    T - The type of the contained object.
    All Implemented Interfaces:
    java.util.Iterator<T>

    @Deprecated
    public class OneElementIterator<T>
    extends java.lang.Object
    implements java.util.Iterator<T>
    Deprecated.
    Will be removed in next minor release.
    Iterator that iterates over exact one element.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private T element
      Deprecated.
       
      private boolean hasNext
      Deprecated.
       
    • Constructor Summary

      Constructors 
      Constructor Description
      OneElementIterator​(T element)
      Deprecated.
       
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      boolean hasNext()
      Deprecated.
       
      T next()
      Deprecated.
       
      void remove()
      Deprecated.
       
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Iterator

        forEachRemaining
    • Field Detail

      • element

        private final T element
        Deprecated.
      • hasNext

        private boolean hasNext
        Deprecated.
    • Constructor Detail

      • OneElementIterator

        public OneElementIterator​(T element)
        Deprecated.
        Parameters:
        element - The element to iterate over. May be null.
    • Method Detail

      • hasNext

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

        public T next()
               throws java.util.NoSuchElementException
        Deprecated.
        Specified by:
        next in interface java.util.Iterator<T>
        Throws:
        java.util.NoSuchElementException
        See Also:
        Iterator.next()
      • remove

        public void remove()
                    throws java.lang.UnsupportedOperationException
        Deprecated.
        Specified by:
        remove in interface java.util.Iterator<T>
        Throws:
        java.lang.UnsupportedOperationException
        See Also:
        Iterator.remove()