    001package com.hammurapi.common.concurrent;
    002
    003import java.util.Iterator;
    004
    005/**
    006 * Adapts iterator to argument iterator.
    007 * @author Pavel Vlasov
    008 *
    009 * @param <E>
    010 */
    011public class ArgumentIteratorAdapter<E> implements ArgumentIterator<E> {
    012
    013        private Iterator<E> master;
    014
    015        public ArgumentIteratorAdapter(Iterator<E> master) {
    016                super();
    017                this.master = master;
    018        }
    019
    020        @Override
    021        public boolean hasNext() {
    022                return master.hasNext();
    023        }
    024
    025        @Override
    026        public E next() {
    027                return master.next();
    028        }
    029
    030        @Override
    031        public void remove() {
    032                master.remove();
    033        }
    034
    035}