@Override public NoSuchElementException call() throws Exception { return new NoSuchElementException(); } }
@Override public T next() { if (done) { throw new NoSuchElementException(); } done = true; return value; } };
@Override public Range<C> range() { throw new NoSuchElementException(); }
@Override public C first() { throw new NoSuchElementException(); }
@Override public Range<C> range(BoundType lowerBoundType, BoundType upperBoundType) { throw new NoSuchElementException(); }
@Override public Object next() { throw new NoSuchElementException(); }
@Override public C last() { throw new NoSuchElementException(); }
@Override public Range span() { throw new NoSuchElementException(); }
public JsonValue next () { current = entry; if (current == null) throw new NoSuchElementException(); entry = current.next; return current; }
/** Returns the first (head) item in the queue (without removing it). * @see #addFirst(Object) * @see #removeFirst() * @throws NoSuchElementException when queue is empty */ public T first () { if (size == 0) { // Underflow throw new NoSuchElementException("Queue is empty."); } return values[head]; }
private static int indexOf(Object[] array, Object toFind) { for (int i = 0; i < array.length; i++) { if (toFind.equals(array[i])) return i; } throw new NoSuchElementException(); }
/** * Returns the url identifying the resource. * * <p>See {@link ClassLoader#getResource} * * @throws NoSuchElementException if the resource cannot be loaded through the class loader, * despite physically existing in the class path. */ public final URL url() { URL url = loader.getResource(resourceName); if (url == null) { throw new NoSuchElementException(resourceName); } return url; }
@Override public E next() { int index = Integer.numberOfTrailingZeros(remainingSetBits); if (index == 32) { throw new NoSuchElementException(); } remainingSetBits &= ~(1 << index); return elements.get(index); } };
@Override public E next() { this.inUse = true; for (Iterator<E> iterator : this.iterators) { if (iterator.hasNext()) { return iterator.next(); } } throw new NoSuchElementException("All iterators exhausted"); }
@Override public T next() { if (!iterator.hasNext()) { iterator = iterable.iterator(); if (!iterator.hasNext()) { throw new NoSuchElementException(); } } return iterator.next(); }
@Override public void onComplete() { downstream.onError(new NoSuchElementException()); } }
@Override public Long next() { long c = count; if (c != end) { count = c + 1; return c; } throw new NoSuchElementException(); }
@Override public Snapshot next() { if (!hasNext()) throw new NoSuchElementException(); removeSnapshot = nextSnapshot; nextSnapshot = null; return removeSnapshot; }
@Override public String next() { if (!hasNext()) throw new NoSuchElementException(); String result = nextUrl; nextUrl = null; canRemove = true; return result; }
Object getElement() { if (element == null) { throw new NoSuchElementException(); } else if (extras == null) { return element; } else { throw multiples(false); } } }