src/share/classes/java/util/concurrent/ConcurrentSkipListSet.java

Print this page




 345     }
 346 
 347     /**
 348      * @throws ClassCastException {@inheritDoc}
 349      * @throws NullPointerException if the specified element is null
 350      */
 351     public E ceiling(E e) {
 352         return m.ceilingKey(e);
 353     }
 354 
 355     /**
 356      * @throws ClassCastException {@inheritDoc}
 357      * @throws NullPointerException if the specified element is null
 358      */
 359     public E higher(E e) {
 360         return m.higherKey(e);
 361     }
 362 
 363     public E pollFirst() {
 364         Map.Entry<E,Object> e = m.pollFirstEntry();
 365         return e == null? null : e.getKey();
 366     }
 367 
 368     public E pollLast() {
 369         Map.Entry<E,Object> e = m.pollLastEntry();
 370         return e == null? null : e.getKey();
 371     }
 372 
 373 
 374     /* ---------------- SortedSet operations -------------- */
 375 
 376 
 377     public Comparator<? super E> comparator() {
 378         return m.comparator();
 379     }
 380 
 381     /**
 382      * @throws NoSuchElementException {@inheritDoc}
 383      */
 384     public E first() {
 385         return m.firstKey();
 386     }
 387 
 388     /**
 389      * @throws NoSuchElementException {@inheritDoc}
 390      */




 345     }
 346 
 347     /**
 348      * @throws ClassCastException {@inheritDoc}
 349      * @throws NullPointerException if the specified element is null
 350      */
 351     public E ceiling(E e) {
 352         return m.ceilingKey(e);
 353     }
 354 
 355     /**
 356      * @throws ClassCastException {@inheritDoc}
 357      * @throws NullPointerException if the specified element is null
 358      */
 359     public E higher(E e) {
 360         return m.higherKey(e);
 361     }
 362 
 363     public E pollFirst() {
 364         Map.Entry<E,Object> e = m.pollFirstEntry();
 365         return (e == null) ? null : e.getKey();
 366     }
 367 
 368     public E pollLast() {
 369         Map.Entry<E,Object> e = m.pollLastEntry();
 370         return (e == null) ? null : e.getKey();
 371     }
 372 
 373 
 374     /* ---------------- SortedSet operations -------------- */
 375 
 376 
 377     public Comparator<? super E> comparator() {
 378         return m.comparator();
 379     }
 380 
 381     /**
 382      * @throws NoSuchElementException {@inheritDoc}
 383      */
 384     public E first() {
 385         return m.firstKey();
 386     }
 387 
 388     /**
 389      * @throws NoSuchElementException {@inheritDoc}
 390      */