{  if (list == null || list.size() == 0) { throw new IllegalArgumentException("The supplied list was invalid."); }  if (this.list != list) {  this.list = list;  fireStateChanged(); }   index = 0; }
{  if (list == null || list.size() == 0) throw new IllegalArgumentException("The supplied list was invalid.");   if (this.list != list) {  this.list = list;  fireStateChanged(); }   index = 0; }
    public void setList(List list)    {	/* Check for null or zero size list */	if (list == null || list.size() == 0)	    {		throw new IllegalArgumentException("The supplied list was invalid.");	    }	/* Check for a change of referenced list */	if (this.list != list)	    {		/* Store the new list */		this.list = list;		/* Notify listeners of a change */		fireStateChanged();	    }	/* We reset the other values in either case */	/* Set the index to 0 */	index = 0;    }