Package java.util

Examples of java.util.LinkedList.poll()


    }

    public void test_poll() {
        assertEquals("should return the head", objArray[0], ll.poll());
        LinkedList list = new LinkedList();
        assertNull("should return 'null' if list is empty", list.poll());
    }

    public void test_remove() {
        for (int i = 0; i < objArray.length; i++) {
            assertEquals("should remove the head", objArray[i], ll.remove());
View Full Code Here


     * @tests {@link java.util.LinkedList#poll()}
     */
    public void test_poll() {
        assertEquals("should return the head", objArray[0], ll.poll());
        LinkedList list = new LinkedList();
        assertNull("should return 'null' if list is empty", list.poll());
    }

    /**
     * @tests {@link java.util.LinkedList#remove()}
     */
 
View Full Code Here

      {
         LinkedList list = lists[index];

         Assert.assertNotNull(list);

         int elem = (Integer)list.poll();

         Assert.assertEquals(messageCount, elem);

         index++;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.