Home / Class/ ConcurrentSkipListIntObjMultimapTest Class — netty Architecture

ConcurrentSkipListIntObjMultimapTest Class — netty Architecture

Architecture documentation for the ConcurrentSkipListIntObjMultimapTest class in ConcurrentSkipListIntObjMultimapTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  b8d62292_25db_2195_8bbe_2ebd67dc18b5["ConcurrentSkipListIntObjMultimapTest"]
  ed59a5e7_d256_3718_61bf_38898f7187db["ConcurrentSkipListIntObjMultimapTest.java"]
  b8d62292_25db_2195_8bbe_2ebd67dc18b5 -->|defined in| ed59a5e7_d256_3718_61bf_38898f7187db
  0f32dbc1_042c_4951_fdc7_e57a5eb241f7["setUp()"]
  b8d62292_25db_2195_8bbe_2ebd67dc18b5 -->|method| 0f32dbc1_042c_4951_fdc7_e57a5eb241f7
  4d210f58_b371_25a0_51f5_d0a565e10a05["addIterateAndRemoveEntries()"]
  b8d62292_25db_2195_8bbe_2ebd67dc18b5 -->|method| 4d210f58_b371_25a0_51f5_d0a565e10a05
  f082d83b_64c9_2c71_870c_6bb9d92b4dcb["clearMustRemoveAllEntries()"]
  b8d62292_25db_2195_8bbe_2ebd67dc18b5 -->|method| f082d83b_64c9_2c71_870c_6bb9d92b4dcb
  cef48f7d_1a7c_68cf_6f79_ec9eff0c121b["pollingFirstEntryOfUniqueKeys()"]
  b8d62292_25db_2195_8bbe_2ebd67dc18b5 -->|method| cef48f7d_1a7c_68cf_6f79_ec9eff0c121b
  f9c175e4_1e1e_1eb9_b410_89fa57ca2902["pollingLastEntryOfUniqueKeys()"]
  b8d62292_25db_2195_8bbe_2ebd67dc18b5 -->|method| f9c175e4_1e1e_1eb9_b410_89fa57ca2902
  af74d20d_2b28_8c38_c025_c6939f0543c3["addMultipleEntriesForSameKey()"]
  b8d62292_25db_2195_8bbe_2ebd67dc18b5 -->|method| af74d20d_2b28_8c38_c025_c6939f0543c3
  0c117913_fb63_8d1d_9878_fa0aad1472c6["iteratorRemoveSecondOfMultiMappedEntry()"]
  b8d62292_25db_2195_8bbe_2ebd67dc18b5 -->|method| 0c117913_fb63_8d1d_9878_fa0aad1472c6
  13d89a80_bc6d_1738_e814_6928a06dcbd1["firstKeyOrEntry()"]
  b8d62292_25db_2195_8bbe_2ebd67dc18b5 -->|method| 13d89a80_bc6d_1738_e814_6928a06dcbd1
  2e5dcdc7_b152_3c33_f7d4_0619b35688fe["lastKeyOrEntry()"]
  b8d62292_25db_2195_8bbe_2ebd67dc18b5 -->|method| 2e5dcdc7_b152_3c33_f7d4_0619b35688fe
  03ef3dad_fcf2_690a_895d_557e12d50b5d["firstLastKeyOrEntry()"]
  b8d62292_25db_2195_8bbe_2ebd67dc18b5 -->|method| 03ef3dad_fcf2_690a_895d_557e12d50b5d
  9a4369d1_de41_4b19_8c03_e6561f31fee6["lowerEntryOrKey()"]
  b8d62292_25db_2195_8bbe_2ebd67dc18b5 -->|method| 9a4369d1_de41_4b19_8c03_e6561f31fee6
  b3aa6dfd_1846_9e0a_8c90_6e0b75d90699["lowerEntryOrKeyMismatch()"]
  b8d62292_25db_2195_8bbe_2ebd67dc18b5 -->|method| b3aa6dfd_1846_9e0a_8c90_6e0b75d90699
  65e93abb_0221_3aaa_7182_2d58e58fda63["floorEntryOrKey()"]
  b8d62292_25db_2195_8bbe_2ebd67dc18b5 -->|method| 65e93abb_0221_3aaa_7182_2d58e58fda63

Relationship Graph

Source Code

common/src/test/java/io/netty/util/concurrent/ConcurrentSkipListIntObjMultimapTest.java lines 38–442

class ConcurrentSkipListIntObjMultimapTest {
    private ConcurrentSkipListIntObjMultimap<String> map;
    private int noKey;

    @BeforeEach
    void setUp() {
        noKey = -1;
        map = new ConcurrentSkipListIntObjMultimap<String>(noKey);
    }

    @Test
    void addIterateAndRemoveEntries() throws Exception {
        assertFalse(map.iterator().hasNext());
        map.put(1, "a");
        map.put(2, "b");
        assertFalse(map.isEmpty());
        assertEquals(2, map.size());
        IntEntry<String> entry;
        Iterator<IntEntry<String>> itr = map.iterator();
        assertTrue(itr.hasNext());
        entry = itr.next();
        itr.remove();
        assertEquals(new IntEntry<String>(1, "a"), entry);
        assertTrue(itr.hasNext());
        entry = itr.next();
        itr.remove();
        assertEquals(new IntEntry<String>(2, "b"), entry);
        assertFalse(itr.hasNext());
        assertTrue(map.isEmpty());
        assertEquals(0, map.size());
    }

    @Test
    void clearMustRemoveAllEntries() throws Exception {
        map.put(2, "b");
        map.put(1, "a");
        map.put(3, "c");
        assertEquals(3, map.size());
        map.clear();
        assertEquals(0, map.size());
        assertFalse(map.iterator().hasNext());
        assertTrue(map.isEmpty());
    }

    @Test
    void pollingFirstEntryOfUniqueKeys() throws Exception {
        map.put(2, "b");
        map.put(1, "a");
        map.put(3, "c");
        assertEquals(new IntEntry<String>(1, "a"), map.pollFirstEntry());
        assertEquals(new IntEntry<String>(2, "b"), map.pollFirstEntry());
        assertEquals(new IntEntry<String>(3, "c"), map.pollFirstEntry());
        assertTrue(map.isEmpty());
        assertEquals(0, map.size());
        assertFalse(map.iterator().hasNext());
    }

    @Test
    void pollingLastEntryOfUniqueKeys() throws Exception {
        map.put(2, "b");
        map.put(1, "a");
        map.put(3, "c");
        assertEquals(new IntEntry<String>(3, "c"), map.pollLastEntry());
        assertEquals(new IntEntry<String>(2, "b"), map.pollLastEntry());
        assertEquals(new IntEntry<String>(1, "a"), map.pollLastEntry());
        assertTrue(map.isEmpty());
        assertEquals(0, map.size());
        assertFalse(map.iterator().hasNext());
    }

    @Test
    void addMultipleEntriesForSameKey() throws Exception {
        map.put(2, "b1");
        map.put(1, "a");
        map.put(2, "b2"); // second entry for the 2 key
        map.put(3, "c");
        assertEquals(4, map.size());

        IntEntry<String> entry;
        Iterator<IntEntry<String>> itr = map.iterator();
        assertTrue(itr.hasNext());

Frequently Asked Questions

What is the ConcurrentSkipListIntObjMultimapTest class?
ConcurrentSkipListIntObjMultimapTest is a class in the netty codebase, defined in common/src/test/java/io/netty/util/concurrent/ConcurrentSkipListIntObjMultimapTest.java.
Where is ConcurrentSkipListIntObjMultimapTest defined?
ConcurrentSkipListIntObjMultimapTest is defined in common/src/test/java/io/netty/util/concurrent/ConcurrentSkipListIntObjMultimapTest.java at line 38.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free