[cvs] / jsr166 / src / main / java / util / concurrent / SynchronousQueue.java Repository:
ViewVC logotype

Diff of /jsr166/src/main/java/util/concurrent/SynchronousQueue.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.66, Sun May 28 23:36:29 2006 UTC revision 1.67, Wed Aug 8 16:48:48 2007 UTC
# Line 991  Line 991 
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>.
# Line 1010  Line 998 
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      /**      /**

Legend:
Removed from v.1.66  
changed lines
  Added in v.1.67

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8