Home / Function/ higherEntryOrKey() — netty Function Reference

higherEntryOrKey() — netty Function Reference

Architecture documentation for the higherEntryOrKey() function in ConcurrentSkipListIntObjMultimapTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  31aad2e8_c9e4_c182_c0ef_340489c1a64f["higherEntryOrKey()"]
  b8d62292_25db_2195_8bbe_2ebd67dc18b5["ConcurrentSkipListIntObjMultimapTest"]
  31aad2e8_c9e4_c182_c0ef_340489c1a64f -->|defined in| b8d62292_25db_2195_8bbe_2ebd67dc18b5
  style 31aad2e8_c9e4_c182_c0ef_340489c1a64f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

common/src/test/java/io/netty/util/concurrent/ConcurrentSkipListIntObjMultimapTest.java lines 352–374

    @SuppressWarnings("unchecked")
    @RepeatedTest(100)
    void higherEntryOrKey() {
        IntEntry<String>[] xs = new IntEntry[50];
        for (int i = 0; i < xs.length; i++) {
            int key = ThreadLocalRandom.current().nextInt(50);
            xs[i] = new IntEntry<>(key, String.valueOf(key));
            map.put(key, xs[i].getValue());
        }
        Arrays.sort(xs);
        for (int i = 0; i < 10; i++) {
            IntEntry<String> target = xs[ThreadLocalRandom.current().nextInt(xs.length)];
            IntEntry<String> expected = null;
            for (IntEntry<String> x : xs) {
                if (x.compareTo(target) > 0) {
                    expected = x;
                    break;
                }
            }
            assertEquals(expected, map.higherEntry(target.getKey()));
            assertEquals(expected == null ? noKey : expected.getKey(), map.higherKey(target.getKey()));
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does higherEntryOrKey() do?
higherEntryOrKey() is a function in the netty codebase, defined in common/src/test/java/io/netty/util/concurrent/ConcurrentSkipListIntObjMultimapTest.java.
Where is higherEntryOrKey() defined?
higherEntryOrKey() is defined in common/src/test/java/io/netty/util/concurrent/ConcurrentSkipListIntObjMultimapTest.java at line 352.

Analyze Your Own Codebase

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

Try Supermodel Free