Code example for Iterator

Methods: hasNext

0
    protected AdaptedIterator(Iterable<? extends T> core) {
        this(core.iterator());
    } 
 
    public boolean hasNext() { 
        return core.hasNext();
    } 
 
    public U next() { 
        return adapt(core.next());
    } 
 
    protected abstract U adapt(T item);
 
    public void remove() { 
        core.remove();
    } 
}