Examples of peekFirst()


Examples of java.util.ArrayDeque.peekFirst()

    @Test
    public void peek() throws Exception {
        ArrayDeque deque = create();
        assert deque.size() == 4;
        assert deque.peek().equals("1");
        assert deque.peekFirst().equals("1");
        assert deque.peekLast().equals("4");
        assert deque.size() == 4;
    }

    @Test
View Full Code Here

Examples of java.util.ArrayDeque.peekFirst()

    @Test
    public void remove() throws Exception {
        ArrayDeque deque = create();
        assert deque.remove("1");
        assert deque.size() == 3;
        assert deque.peekFirst().equals("2");

        assert deque.remove("4");
        assert deque.size() == 2;
        assert deque.peekLast().equals("3");
    }
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.