Code example for PriorityQueue

Methods: offer

0
               new F() { void f() { 
                   new LinkedBlockingDeque<String>().add(null);
               }}, 
 
               new F() { void f() { 
                   new PriorityQueue<String>().offer(null);
               }}, 
               new F() { void f() { 
                   new PriorityBlockingQueue<String>().offer(null);
               }}); 
 
        nullSortedSet.add("foo");
        nullCollection.add("foo");
        THROWS(NullPointerException.class,
               new F() { void f() { 
                   new PriorityQueue<String>(nullCollection);
               }}, 
               new F() { void f() { 
                   new PriorityBlockingQueue<String>(nullCollection);
               }},