Page 1 of 1

Iterable CardList

PostPosted: 20 Sep 2009, 21:14
by eugenrivniy
Hi. I think that if CardList will be iterable, it be more usefull, because we can use easy-to-use 'foreach' instead of complex'for (...)'.
Patch attached.

Code: Select all
3c3
< public class CardList
---
> public class CardList implements Iterable<Card>
208a209,213
>     
>    @Override
>    public Iterator<Card> iterator() {      
>       return list.iterator();
>    }

Re: Iterable CardList

PostPosted: 21 Sep 2009, 00:50
by DennisBergkamp
Cool, I've changed this for the next version, thanks :)

Re: Iterable CardList

PostPosted: 22 Sep 2009, 09:42
by nantuko84
really cool!)