Class ImmutableConfigurationInvocationHandler.ImmutableIterator

java.lang.Object
org.apache.commons.configuration2.ImmutableConfigurationInvocationHandler.ImmutableIterator
All Implemented Interfaces:
Iterator<Object>
Enclosing class:
ImmutableConfigurationInvocationHandler

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

    • wrappedIterator

      private final Iterator<?> wrappedIterator
      The underlying iterator.
  • Constructor Details

    • ImmutableIterator

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

    • hasNext

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

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

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