Code example for Iterator

Methods: hasNext

0
            public T next() { 
                return this.itty.next();
            } 
 
            public boolean hasNext() { 
                return this.itty.hasNext();
            } 
        }; 
    } 
 
    public void close() { 
        if (this.iterable instanceof CloseableIterable) {
            ((CloseableIterable) this.iterable).close();
        } 
    } 
 
    public String toString() {
        return this.iterable.toString();
    } 
}