class CheckedIterator {

    public boolean all(@NonNull Predicate<? super E> predicate) throws T {
        requireNonNull(predicate);
        while (hasNext()) {
            E element = next();
            if (!predicate.test(element)) {
                return false;
            }
        }
        return true;
    }

}