Package java.util

Examples of java.util.ArrayDeque$ArrayDequeIterator


        assert deque.peekLast().equals("3");
    }

    @Test
    public void contains() throws Exception {
        ArrayDeque deque = create();
        assert deque.contains("3");
        assert deque.contains("4");
        assert !deque.contains("none");
    }
View Full Code Here


        assert !iterator.hasNext();
    }

    @Test
    public void iteratorRemove() throws Exception {
        ArrayDeque deque = create();
        Iterator iterator = deque.iterator();
        assert iterator.hasNext();
        assert iterator.next().equals("1");
        assert iterator.hasNext();
        assert iterator.next().equals("2");

        assert deque.contains("2");
        iterator.remove();
        assert !deque.contains("2");
    }
View Full Code Here

     * </p>
     *
     * @return
     */
    private ArrayDeque<String> create() {
        ArrayDeque deque = new ArrayDeque();

        deque.add("1");
        deque.add("2");
        deque.add("3");
        deque.add("4");

        return deque;
    }
View Full Code Here

TOP

Related Classes of java.util.ArrayDeque$ArrayDequeIterator

Copyright © 2018 www.massapicom. 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.