Java Code Examples for java.util.concurrent.ConcurrentLinkedDeque#poll()
The following examples show how to use
java.util.concurrent.ConcurrentLinkedDeque#poll() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ConcurrentLinkedDequeTest.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * contains(x) reports true when elements added but not yet removed */ public void testContains() { ConcurrentLinkedDeque q = populatedDeque(SIZE); for (int i = 0; i < SIZE; ++i) { assertTrue(q.contains(new Integer(i))); q.poll(); assertFalse(q.contains(new Integer(i))); } }
Example 2
Source File: ConcurrentLinkedDequeTest.java From j2objc with Apache License 2.0 | 5 votes |
/** * contains(x) reports true when elements added but not yet removed */ public void testContains() { ConcurrentLinkedDeque q = populatedDeque(SIZE); for (int i = 0; i < SIZE; ++i) { assertTrue(q.contains(new Integer(i))); q.poll(); assertFalse(q.contains(new Integer(i))); } }