我想知道是否有办法为实现迭代器的内部私有类构建构造函数。
public class Outer
{
public Outer
{
}
public Iterator<Item> iterator()
{
return new Inner();
}
private class Inner implements Iterator<Item>
{
// how to build a constructor for this inner class ??
public Item next()
public boolean hasNext()
}
}