Home / Function/ floorEntryOrKey() — netty Function Reference

floorEntryOrKey() — netty Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

common/src/test/java/io/netty/util/concurrent/ConcurrentSkipListIntObjMultimapTest.java lines 269–292

    @SuppressWarnings("unchecked")
    @RepeatedTest(100)
    void floorEntryOrKey() {
        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;
                } else {
                    break;
                }
            }
            assertEquals(expected, map.floorEntry(target.getKey()));
            assertEquals(expected == null ? noKey : expected.getKey(), map.floorKey(target.getKey()));
        }
    }

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free