class CoffrrIterator implements Iterator<Coffee> { int cunt = size; public boolean hasNext() { return count > 0; } public Coffee next() { count--; return CoffeeGenerato.this.next(); } public void remove () { } }
代码来做编程思想
class CoffrrIterator implements Iterator<Coffee> { int cunt = size; public boolean hasNext() { return count > 0; } public Coffee next() { count--; return CoffeeGenerato.this.next(); } public void remove () { } }
代码来做编程思想