Back to project page OpenGL-Sample-Android.
The source code is released under:
GNU General Public License
If you think the Android project OpenGL-Sample-Android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.soft.wz.sample.utils; /*from w ww. ja v a2 s . c o m*/ import java.util.Iterator; import java.util.List; /** * Created by wz on 01/10/2015. */ public class CircularIterator<E> implements Iterator<E> { private List<E> list; private int index = -1; public CircularIterator(List<E> list) { this.list = list; } @Override public boolean hasNext() { return true; } @Override public E next() { if (++index > (list.size() - 1)) { index = 0; } return list.get(index); } @Override public void remove() { list.remove(index); } }