Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for fromLong (0.17 sec)

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

      public void testFromLong() {
        for (ExpectedHashCode expected : expectedHashCodes) {
          if (expected.bytes.length == 8) {
            HashCode fromLong = HashCode.fromLong(expected.asLong);
            assertExpectedHashCode(expected, fromLong);
          }
        }
      }
    
      public void testFromBytes() {
        for (ExpectedHashCode expected : expectedHashCodes) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 13.1K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/hash/HashingTest.java

        assertThrows(IllegalArgumentException.class, () -> Hashing.consistentHash(5L, 0));
      }
    
      public void testConsistentHash_ofHashCode() {
        checkSameResult(HashCode.fromLong(1), 1);
        checkSameResult(HashCode.fromLong(0x9999999999999999L), 0x9999999999999999L);
        checkSameResult(HashCode.fromInt(0x99999999), 0x0000000099999999L);
      }
    
      public void checkSameResult(HashCode hashCode, long equivLong) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 26.5K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/hash/HashCodeTest.java

      public void testFromLong() {
        for (ExpectedHashCode expected : expectedHashCodes) {
          if (expected.bytes.length == 8) {
            HashCode fromLong = HashCode.fromLong(expected.asLong);
            assertExpectedHashCode(expected, fromLong);
          }
        }
      }
    
      public void testFromBytes() {
        for (ExpectedHashCode expected : expectedHashCodes) {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 13.1K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/hash/HashingTest.java

        assertThrows(IllegalArgumentException.class, () -> Hashing.consistentHash(5L, 0));
      }
    
      public void testConsistentHash_ofHashCode() {
        checkSameResult(HashCode.fromLong(1), 1);
        checkSameResult(HashCode.fromLong(0x9999999999999999L), 0x9999999999999999L);
        checkSameResult(HashCode.fromInt(0x99999999), 0x0000000099999999L);
      }
    
      public void checkSameResult(HashCode hashCode, long equivLong) {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 26.5K bytes
    - Viewed (0)
  5. android/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);
          }
        }
      }
    
      private static final long serialVersionUID = 0L;
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 20 18:43:59 GMT 2021
    - 2.7K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/hash/SipHashFunction.java

          // End with a byte encoding the positive integer b mod 256.
          finalM ^= b << 56;
          processM(finalM);
    
          // Finalization
          v2 ^= 0xFFL;
          sipRound(d);
          return HashCode.fromLong(v0 ^ v1 ^ v2 ^ v3);
        }
    
        private void processM(long m) {
          v3 ^= m;
          sipRound(c);
          v0 ^= m;
        }
    
        private void sipRound(int iterations) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 20 18:43:59 GMT 2021
    - 5.3K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/hash/Fingerprint2011.java

      private static final long K3 = 0xc6a4a7935bd1e995L;
    
      @Override
      public HashCode hashBytes(byte[] input, int off, int len) {
        checkPositionIndexes(off, off + len, input.length);
        return HashCode.fromLong(fingerprint(input, off, len));
      }
    
      @Override
      public int bits() {
        return 64;
      }
    
      @Override
      public String toString() {
        return "Hashing.fingerprint2011()";
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Dec 28 17:50:25 GMT 2021
    - 6.5K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/hash/FarmHashFingerprint64.java

      private static final long K2 = 0x9ae16a3b2f90404fL;
    
      @Override
      public HashCode hashBytes(byte[] input, int off, int len) {
        checkPositionIndexes(off, off + len, input.length);
        return HashCode.fromLong(fingerprint(input, off, len));
      }
    
      @Override
      public int bits() {
        return 64;
      }
    
      @Override
      public String toString() {
        return "Hashing.farmHashFingerprint64()";
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Apr 01 22:39:48 GMT 2022
    - 7.6K bytes
    - Viewed (0)
  9. 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 fromLong(long hash) {
        return new LongHashCode(hash);
      }
    
      private static final class LongHashCode extends HashCode implements Serializable {
        final long hash;
    
        LongHashCode(long hash) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 20 18:43:59 GMT 2021
    - 12.6K bytes
    - Viewed (0)
Back to top