package speiger.src.coreengine.utils.collections.iterators;

import java.util.Iterator;

import speiger.src.collections.objects.collections.ObjectBidirectionalIterator;

public class ReverseIterator<T> implements Iterator<T> {
	ObjectBidirectionalIterator<T> iter;
	
	public ReverseIterator(ObjectBidirectionalIterator<T> iter) {
		this.iter = iter;
	}
	
	@Override
	public boolean hasNext() {
		return iter.hasPrevious();
	}
	
	@Override
	public T next() {
		return iter.previous();
	}
}
