peichhorn/lombok-pg — Issue #39: [Enhancement] improve iterator() method of yield
Author: peichhorn
Created: 2011-10-21 12:49:53+00:00
State: open

```
public java.util.Iterator iterator() {
if ($state == 0) {
$state = 1;
return this;
} else return new $YielderMETHODNAME;
}
```

This guarantees that the yielder will be initialized only once and not twice if possible.
For this I also need to add another initial state:

```
case 0:
$state = 1;
```