Sep. 23rd, 2008
NNO in Java
Sep. 23rd, 2008 10:39 am
public class N extends AbstractSet<Integer> {
public Iterator iterator() {
return new Iterator() {
int n = 0;
public boolean hasNext() {
return true;
}
public Integer next() {
return n++;
}
public void remove() {
throw new UnsupportedOperationException();
}
};
}
public int size() {
return Integer.MAX_VALUE;
}
}