Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 21 for fromInt (0.17 sec)

  1. android/guava-tests/test/com/google/common/hash/HashCodeTest.java

      public void testFromInt() {
        for (ExpectedHashCode expected : expectedHashCodes) {
          if (expected.bytes.length == 4) {
            HashCode fromInt = HashCode.fromInt(expected.asInt);
            assertExpectedHashCode(expected, fromInt);
          }
        }
      }
    
      // expectedHashCodes must contain at least one hash code with 8 bytes
      public void testFromLong() {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sun Dec 22 03:38:46 UTC 2024
    - 13.1K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/hash/HashingTest.java

                      ImmutableList.of(HashCode.fromInt(32), HashCode.fromLong(32L)));
            });
      }
    
      public void testCombineUnordered() {
        HashCode hash31 = HashCode.fromInt(31);
        HashCode hash32 = HashCode.fromInt(32);
        assertEquals(hash32, Hashing.combineUnordered(ImmutableList.of(hash32)));
        assertEquals(HashCode.fromInt(64), Hashing.combineUnordered(ImmutableList.of(hash32, hash32)));
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 17:27:14 UTC 2025
    - 26.4K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/hash/HashCodeTest.java

      public void testFromInt() {
        for (ExpectedHashCode expected : expectedHashCodes) {
          if (expected.bytes.length == 4) {
            HashCode fromInt = HashCode.fromInt(expected.asInt);
            assertExpectedHashCode(expected, fromInt);
          }
        }
      }
    
      // expectedHashCodes must contain at least one hash code with 8 bytes
      public void testFromLong() {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sun Dec 22 03:38:46 UTC 2024
    - 13.1K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/hash/HashingTest.java

                      ImmutableList.of(HashCode.fromInt(32), HashCode.fromLong(32L)));
            });
      }
    
      public void testCombineUnordered() {
        HashCode hash31 = HashCode.fromInt(31);
        HashCode hash32 = HashCode.fromInt(32);
        assertEquals(hash32, Hashing.combineUnordered(ImmutableList.of(hash32)));
        assertEquals(HashCode.fromInt(64), Hashing.combineUnordered(ImmutableList.of(hash32, hash32)));
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 17:27:14 UTC 2025
    - 26.4K bytes
    - Viewed (2)
  5. guava/src/com/google/common/hash/ChecksumHashFunction.java

             * cast won't lose any information and is necessary to return a HashCode of the correct
             * size.
             */
            return HashCode.fromInt((int) value);
          } else {
            return HashCode.fromLong(value);
          }
        }
      }
    
      @J2ObjCIncompatible
      @SuppressWarnings("unused")
      private static final class ChecksumMethodHandles {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Feb 13 17:34:21 UTC 2025
    - 4.4K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/hash/Murmur3Hash32Test.java

          assertEquals(hashUtf16, murmur3_32().newHasher().putString(str, UTF_16).hash());
        }
      }
    
      private static void assertHash(int expected, HashCode actual) {
        assertEquals(HashCode.fromInt(expected), actual);
      }
    
      public void testParanoidHashBytes() {
        HashFn hf =
            new HashFn() {
              @Override
              public byte[] hash(byte[] input, int seed) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Dec 19 18:03:30 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  7. guava/src/com/google/common/hash/Murmur3_32HashFunction.java

      private static HashCode fmix(int h1, int length) {
        h1 ^= length;
        h1 ^= h1 >>> 16;
        h1 *= 0x85ebca6b;
        h1 ^= h1 >>> 13;
        h1 *= 0xc2b2ae35;
        h1 ^= h1 >>> 16;
        return HashCode.fromInt(h1);
      }
    
      private static final class Murmur3_32Hasher extends AbstractHasher {
        private int h1;
        private long buffer;
        private int shift;
        private int length;
        private boolean isDone;
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Apr 14 16:36:11 UTC 2025
    - 11.8K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/hash/Murmur3_32HashFunction.java

      private static HashCode fmix(int h1, int length) {
        h1 ^= length;
        h1 ^= h1 >>> 16;
        h1 *= 0x85ebca6b;
        h1 ^= h1 >>> 13;
        h1 *= 0xc2b2ae35;
        h1 ^= h1 >>> 16;
        return HashCode.fromInt(h1);
      }
    
      private static final class Murmur3_32Hasher extends AbstractHasher {
        private int h1;
        private long buffer;
        private int shift;
        private int length;
        private boolean isDone;
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Apr 14 16:36:11 UTC 2025
    - 11.8K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/hash/Crc32cHashFunction.java

            // rolling CRCs.  So we call it on an empty ByteBuffer if we didn't already.
            processRemaining(EMPTY);
          }
          return HashCode.fromInt(~crc0);
        }
    
        static final int[] byteTable = {
          0x00000000, 0xf26b8303, 0xe13b70f7, 0x1350f3f4, 0xc79a971f, 0x35f1141c,
          0x26a1e7e8, 0xd4ca64eb, 0x8ad958cf, 0x78b2dbcc, 0x6be22838, 0x9989ab3b,
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sat Dec 28 01:26:26 UTC 2024
    - 21.2K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/hash/HashCode.java

       * are interpreted in little endian order.
       *
       * @since 15.0 (since 12.0 in HashCodes)
       */
      public static HashCode fromInt(int hash) {
        return new IntHashCode(hash);
      }
    
      private static final class IntHashCode extends HashCode implements Serializable {
        final int hash;
    
        IntHashCode(int hash) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Aug 11 19:31:30 UTC 2025
    - 12.6K bytes
    - Viewed (0)
Back to top