package com.jxml.quick.access;
import java.util.*;

public class QListIterator implements QIterator
{
    private Object current=null;
    private Iterator iterator=null;

    public void setList(List list)
    {
	iterator=list.iterator();
	getNext();
    }

    public Object getCurrent()
    {
	return current;
    }

    public void getNext()
    {
	if (iterator.hasNext())
	    current=iterator.next();
	else
	    current=null;
    }

    public boolean isComplete()
    {
	return current==null;
    }

    public void clear()
    {
	current=null;
	iterator=null;
    }
}
