Class AbstractIteratorDecorator

    • Field Detail

      • iterator

        protected final Iterator iterator
        The iterator being decorated
    • Constructor Detail

      • AbstractIteratorDecorator

        public AbstractIteratorDecorator​(Iterator iterator)
        Constructor that decorates the specified iterator.
        Parameters:
        iterator - the iterator to decorate, must not be null
        Throws:
        IllegalArgumentException - if the collection is null
    • Method Detail

      • getIterator

        protected Iterator getIterator()
        Gets the iterator being decorated.
        Returns:
        the decorated iterator
      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface Iterator
      • remove

        public void remove()
        Specified by:
        remove in interface Iterator