| 991 |
return null; |
return null; |
| 992 |
} |
} |
| 993 |
|
|
|
static class EmptyIterator<E> implements Iterator<E> { |
|
|
public boolean hasNext() { |
|
|
return false; |
|
|
} |
|
|
public E next() { |
|
|
throw new NoSuchElementException(); |
|
|
} |
|
|
public void remove() { |
|
|
throw new IllegalStateException(); |
|
|
} |
|
|
} |
|
|
|
|
| 994 |
/** |
/** |
| 995 |
* Returns an empty iterator in which <tt>hasNext</tt> always returns |
* Returns an empty iterator in which <tt>hasNext</tt> always returns |
| 996 |
* <tt>false</tt>. |
* <tt>false</tt>. |
| 998 |
* @return an empty iterator |
* @return an empty iterator |
| 999 |
*/ |
*/ |
| 1000 |
public Iterator<E> iterator() { |
public Iterator<E> iterator() { |
| 1001 |
return new EmptyIterator<E>(); |
return Collections.emptyIterator(); |
| 1002 |
} |
} |
| 1003 |
|
|
| 1004 |
/** |
/** |