- Sort Score
- Result 10 results
- Languages All
Results 1 - 7 of 7 for asInt (0.03 sec)
-
guava-tests/test/com/google/common/hash/HashCodeTest.java
} private static class ExpectedHashCode { final byte[] bytes; final int asInt; final Long asLong; // null means that asLong should throw an exception final String toString; ExpectedHashCode(byte[] bytes, int asInt, @Nullable Long asLong, String toString) { this.bytes = bytes; this.asInt = asInt; this.asLong = asLong; this.toString = toString; } }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 21 14:28:19 UTC 2024 - 13.1K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/hash/HashCodeTest.java
} private static class ExpectedHashCode { final byte[] bytes; final int asInt; final Long asLong; // null means that asLong should throw an exception final String toString; ExpectedHashCode(byte[] bytes, int asInt, @Nullable Long asLong, String toString) { this.bytes = bytes; this.asInt = asInt; this.asLong = asLong; this.toString = toString; } }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 21 14:28:19 UTC 2024 - 13.1K bytes - Viewed (0) -
guava/src/com/google/common/hash/HashCode.java
return bytes.length * 8; } @Override public byte[] asBytes() { return bytes.clone(); } @Override public int asInt() { checkState( bytes.length >= 4, "HashCode#asInt() requires >= 4 bytes (it only has %s bytes).", bytes.length); return (bytes[0] & 0xFF) | ((bytes[1] & 0xFF) << 8) | ((bytes[2] & 0xFF) << 16)
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 19:54:59 UTC 2024 - 12.6K bytes - Viewed (0) -
android/guava/src/com/google/common/hash/HashCode.java
return bytes.length * 8; } @Override public byte[] asBytes() { return bytes.clone(); } @Override public int asInt() { checkState( bytes.length >= 4, "HashCode#asInt() requires >= 4 bytes (it only has %s bytes).", bytes.length); return (bytes[0] & 0xFF) | ((bytes[1] & 0xFF) << 8) | ((bytes[2] & 0xFF) << 16)
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 19:54:59 UTC 2024 - 12.6K bytes - Viewed (0) -
guava-tests/test/com/google/common/hash/HashTestUtils.java
int key1 = rand.nextInt(); // flip input bit for key2 int key2 = key1 ^ (1 << i); // get hashes int hash1 = function.hashInt(key1).asInt(); int hash2 = function.hashInt(key2).asInt(); // test whether the hash values have same output bits same |= ~(hash1 ^ hash2); // test whether the hash values have different output bits
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 23 14:22:54 UTC 2024 - 25.5K bytes - Viewed (0) -
guava/src/com/google/common/net/InetAddresses.java
} // Many strategies for hashing are possible. This might suffice for now. int coercedHash = Hashing.murmur3_32_fixed().hashLong(addressAsLong).asInt(); // Squash into 224/4 Multicast and 240/4 Reserved space (i.e. 224/3). coercedHash |= 0xe0000000; // Fixup to avoid some "illegal" values. Currently the only potential
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 47.1K bytes - Viewed (0) -
android/guava/src/com/google/common/net/InetAddresses.java
} // Many strategies for hashing are possible. This might suffice for now. int coercedHash = Hashing.murmur3_32_fixed().hashLong(addressAsLong).asInt(); // Squash into 224/4 Multicast and 240/4 Reserved space (i.e. 224/3). coercedHash |= 0xe0000000; // Fixup to avoid some "illegal" values. Currently the only potential
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 47.1K bytes - Viewed (0)