Home / Function/ toUpperCaseLong() — netty Function Reference

toUpperCaseLong() — netty Function Reference

Architecture documentation for the toUpperCaseLong() function in SWARUtilTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  04cc8dbc_89a3_be5f_5965_724db45c5e13["toUpperCaseLong()"]
  f8708bc1_cb99_2db5_e587_516d1dfe420a["SWARUtilTest"]
  04cc8dbc_89a3_be5f_5965_724db45c5e13 -->|defined in| f8708bc1_cb99_2db5_e587_516d1dfe420a
  9faf3741_2af6_d6a7_e666_a118e579fb59["getExtendedAsciiTable()"]
  04cc8dbc_89a3_be5f_5965_724db45c5e13 -->|calls| 9faf3741_2af6_d6a7_e666_a118e579fb59
  764a7bba_90e6_f89c_eb25_5b8e3334837c["shuffleArray()"]
  04cc8dbc_89a3_be5f_5965_724db45c5e13 -->|calls| 764a7bba_90e6_f89c_eb25_5b8e3334837c
  4f5c93d8_0e34_e7e1_a91a_0838ebdb8af8["getLong()"]
  04cc8dbc_89a3_be5f_5965_724db45c5e13 -->|calls| 4f5c93d8_0e34_e7e1_a91a_0838ebdb8af8
  style 04cc8dbc_89a3_be5f_5965_724db45c5e13 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

common/src/test/java/io/netty/util/internal/SWARUtilTest.java lines 104–122

    @Test
    void toUpperCaseLong() {
        // given
        final byte[] asciiTable = getExtendedAsciiTable();
        shuffleArray(asciiTable, random);

        // when
        for (int idx = 0; idx < asciiTable.length; idx += Long.BYTES) {
            final long value = getLong(asciiTable, idx);
            final long actual = SWARUtil.toUpperCase(value);
            long expected = 0L;
            for (int i = 0; i < Long.BYTES; i++) {
                final byte b = (byte) Character.toUpperCase(asciiTable[idx + i]);
                expected |= (long) ((b & 0xff)) << (56 - (Long.BYTES * i));
            }
            // then
            assertEquals(expected, actual);
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does toUpperCaseLong() do?
toUpperCaseLong() is a function in the netty codebase, defined in common/src/test/java/io/netty/util/internal/SWARUtilTest.java.
Where is toUpperCaseLong() defined?
toUpperCaseLong() is defined in common/src/test/java/io/netty/util/internal/SWARUtilTest.java at line 104.
What does toUpperCaseLong() call?
toUpperCaseLong() calls 3 function(s): getExtendedAsciiTable, getLong, shuffleArray.

Analyze Your Own Codebase

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

Try Supermodel Free