Created
September 24, 2015 15:22
-
-
Save iljaiwas/51eaa084ef9535eb7339 to your computer and use it in GitHub Desktop.
Common Android or Java pattern? Why no for loop?
This file contains 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
private void fireDoneEvent(Iterator<QueueJobObserver> it) | |
{ | |
if (it.hasNext()) | |
{ | |
QueueJobObserver observer = it.next(); | |
fireDoneEvent(it); | |
observer.jobDone(this); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Don't know, but maybe the order of the "jobDone" calls matters?
Or it's just because loops are so old-school since hipsters discovered functional programming...