/** * Returns a string representation of the current item or * <code>null</code> if the current item is null. <b>If {@link * #auto} is true, this will shift after returning the current * item</b>. * @return string representation of the current item */ public String toString() { Object o = list[index]; if (auto) { shift(); } if (o == null) { return null; } return o.toString(); } }
/** * Returns the current item, then shifts the list index. * @return current item */ public Object getNext() { Object o = getCurrent(); shift(); return o; }