Java Code Examples for java.util.concurrent.ConcurrentNavigableMap#putAll()

The following examples show how to use java.util.concurrent.ConcurrentNavigableMap#putAll() . 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: ConcurrentSkipListSubMapTest.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * putAll adds all key-value pairs from the given map
 */
public void testPutAll() {
    ConcurrentNavigableMap empty = map0();
    ConcurrentNavigableMap map = map5();
    empty.putAll(map);
    assertEquals(5, empty.size());
    assertTrue(empty.containsKey(one));
    assertTrue(empty.containsKey(two));
    assertTrue(empty.containsKey(three));
    assertTrue(empty.containsKey(four));
    assertTrue(empty.containsKey(five));
}
 
Example 2
Source File: ConcurrentSkipListSubMapTest.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * putAll adds all key-value pairs from the given map
 */
public void testDescendingPutAll() {
    ConcurrentNavigableMap empty = dmap0();
    ConcurrentNavigableMap map = dmap5();
    empty.putAll(map);
    assertEquals(5, empty.size());
    assertTrue(empty.containsKey(m1));
    assertTrue(empty.containsKey(m2));
    assertTrue(empty.containsKey(m3));
    assertTrue(empty.containsKey(m4));
    assertTrue(empty.containsKey(m5));
}
 
Example 3
Source File: BTreeMapTest5.java    From scava with Eclipse Public License 2.0 5 votes vote down vote up
/**
 * putAll adds all key-value pairs from the given map
 */
public void testPutAll() {
    ConcurrentNavigableMap empty = map0();
    ConcurrentNavigableMap map = map5();
    empty.putAll(map);
    assertEquals(5, empty.size());
    assertTrue(empty.containsKey(one));
    assertTrue(empty.containsKey(two));
    assertTrue(empty.containsKey(three));
    assertTrue(empty.containsKey(four));
    assertTrue(empty.containsKey(five));
}
 
Example 4
Source File: ConcurrentSkipListSubMapJUnitTest.java    From gemfirexd-oss with Apache License 2.0 5 votes vote down vote up
/**
 * putAll adds all key-value pairs from the given map
 */
public void testPutAll() {
    ConcurrentNavigableMap empty = map0();
    ConcurrentNavigableMap map = map5();
    empty.putAll(map);
    assertEquals(5, empty.size());
    assertTrue(empty.containsKey(one));
    assertTrue(empty.containsKey(two));
    assertTrue(empty.containsKey(three));
    assertTrue(empty.containsKey(four));
    assertTrue(empty.containsKey(five));
}
 
Example 5
Source File: ConcurrentSkipListSubMapJUnitTest.java    From gemfirexd-oss with Apache License 2.0 5 votes vote down vote up
/**
 * putAll adds all key-value pairs from the given map
 */
public void testDescendingPutAll() {
    ConcurrentNavigableMap empty = dmap0();
    ConcurrentNavigableMap map = dmap5();
    empty.putAll(map);
    assertEquals(5, empty.size());
    assertTrue(empty.containsKey(m1));
    assertTrue(empty.containsKey(m2));
    assertTrue(empty.containsKey(m3));
    assertTrue(empty.containsKey(m4));
    assertTrue(empty.containsKey(m5));
}
 
Example 6
Source File: ConcurrentSkipListSubMapJUnitTest.java    From gemfirexd-oss with Apache License 2.0 5 votes vote down vote up
/**
 * putAll adds all key-value pairs from the given map
 */
public void testPutAll() {
    ConcurrentNavigableMap empty = map0();
    ConcurrentNavigableMap map = map5();
    empty.putAll(map);
    assertEquals(5, empty.size());
    assertTrue(empty.containsKey(one));
    assertTrue(empty.containsKey(two));
    assertTrue(empty.containsKey(three));
    assertTrue(empty.containsKey(four));
    assertTrue(empty.containsKey(five));
}
 
Example 7
Source File: ConcurrentSkipListSubMapJUnitTest.java    From gemfirexd-oss with Apache License 2.0 5 votes vote down vote up
/**
 * putAll adds all key-value pairs from the given map
 */
public void testDescendingPutAll() {
    ConcurrentNavigableMap empty = dmap0();
    ConcurrentNavigableMap map = dmap5();
    empty.putAll(map);
    assertEquals(5, empty.size());
    assertTrue(empty.containsKey(m1));
    assertTrue(empty.containsKey(m2));
    assertTrue(empty.containsKey(m3));
    assertTrue(empty.containsKey(m4));
    assertTrue(empty.containsKey(m5));
}
 
Example 8
Source File: ConcurrentSkipListSubMapTest.java    From j2objc with Apache License 2.0 5 votes vote down vote up
/**
 * putAll adds all key-value pairs from the given map
 */
public void testPutAll() {
    ConcurrentNavigableMap empty = map0();
    ConcurrentNavigableMap map = map5();
    empty.putAll(map);
    assertEquals(5, empty.size());
    assertTrue(empty.containsKey(one));
    assertTrue(empty.containsKey(two));
    assertTrue(empty.containsKey(three));
    assertTrue(empty.containsKey(four));
    assertTrue(empty.containsKey(five));
}
 
Example 9
Source File: ConcurrentSkipListSubMapTest.java    From j2objc with Apache License 2.0 5 votes vote down vote up
/**
 * putAll adds all key-value pairs from the given map
 */
public void testDescendingPutAll() {
    ConcurrentNavigableMap empty = dmap0();
    ConcurrentNavigableMap map = dmap5();
    empty.putAll(map);
    assertEquals(5, empty.size());
    assertTrue(empty.containsKey(m1));
    assertTrue(empty.containsKey(m2));
    assertTrue(empty.containsKey(m3));
    assertTrue(empty.containsKey(m4));
    assertTrue(empty.containsKey(m5));
}