Code example for Iterator

Methods: next

0
    public boolean hasNext() { 
        return core.hasNext();
    } 
 
    public U next() { 
        return adapt(core.next());
    } 
 
    protected abstract U adapt(T item);
 
    public void remove() { 
        core.remove();
    } 
}