package com.hammurapi.common.concurrent;

import java.util.Iterator;

/**
 * Adapts iterator to argument iterator.
 * @author Pavel Vlasov
 *
 * @param <E>
 */
public class ArgumentIteratorAdapter<E> implements ArgumentIterator<E> {
	
	private Iterator<E> master;
	
	public ArgumentIteratorAdapter(Iterator<E> master) {
		super();
		this.master = master;
	}

	@Override
	public boolean hasNext() {
		return master.hasNext();
	}

	@Override
	public E next() {
		return master.next();
	}

	@Override
	public void remove() {
		master.remove();
	}

}
