Class ImmutableConfigurationInvocationHandler.ImmutableIterator

  • All Implemented Interfaces:
    java.util.Iterator<java.lang.Object>
    Enclosing class:
    ImmutableConfigurationInvocationHandler

    private static final class ImmutableConfigurationInvocationHandler.ImmutableIterator
    extends java.lang.Object
    implements java.util.Iterator<java.lang.Object>
    A specialized Iterator implementation which delegates to an underlying iterator, but does not support the remove() method.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.Iterator<?> wrappedIterator
      The underlying iterator.
    • Constructor Summary

      Constructors 
      Constructor Description
      ImmutableIterator​(java.util.Iterator<?> it)
      Creates a new instance of ImmutableIterator and sets the underlying iterator.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean hasNext()
      This implementation just delegates to the underlying iterator.
      java.lang.Object next()
      This implementation just delegates to the underlying iterator.
      void remove()
      This implementation just throws an exception: removing objects is not supported.
      • 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

      • wrappedIterator

        private final java.util.Iterator<?> wrappedIterator
        The underlying iterator.
    • Constructor Detail

      • ImmutableIterator

        public ImmutableIterator​(java.util.Iterator<?> it)
        Creates a new instance of ImmutableIterator and sets the underlying iterator.
        Parameters:
        it - the underlying iterator
    • Method Detail

      • hasNext

        public boolean hasNext()
        This implementation just delegates to the underlying iterator.
        Specified by:
        hasNext in interface java.util.Iterator<java.lang.Object>
      • next

        public java.lang.Object next()
        This implementation just delegates to the underlying iterator.
        Specified by:
        next in interface java.util.Iterator<java.lang.Object>
      • remove

        public void remove()
        This implementation just throws an exception: removing objects is not supported.
        Specified by:
        remove in interface java.util.Iterator<java.lang.Object>