Created
February 25, 2013 03:55
-
-
Save arlando/5027528 to your computer and use it in GitHub Desktop.
processing-iterator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* A snippet for an iterator pattern... | |
*/ | |
import | |
ArrayList < obj > objs; | |
void draw() { | |
Iterator < obj > objsIterator = objs.iterator(); | |
while(objsIterator.hasNext()) { | |
obj = objsIterator.next() | |
if(obj.isDead()) { | |
objsIterator.remove(); | |
} else { | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment