Skip to content

Instantly share code, notes, and snippets.

@iljaiwas
Created September 24, 2015 15:22
Show Gist options
  • Save iljaiwas/51eaa084ef9535eb7339 to your computer and use it in GitHub Desktop.
Save iljaiwas/51eaa084ef9535eb7339 to your computer and use it in GitHub Desktop.
Common Android or Java pattern? Why no for loop?
private void fireDoneEvent(Iterator<QueueJobObserver> it)
{
if (it.hasNext())
{
QueueJobObserver observer = it.next();
fireDoneEvent(it);
observer.jobDone(this);
}
}
@tinoheth
Copy link

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment