- Sort Score
- Num 10 results
- Language All
Results 11 - 16 of 16 for putUnencodedChars (0.17 seconds)
-
guava-tests/test/com/google/common/hash/FunnelsTest.java
} public void testForStrings() { PrimitiveSink primitiveSink = mock(PrimitiveSink.class); unencodedCharsFunnel().funnel("test", primitiveSink); verify(primitiveSink).putUnencodedChars("test"); } public void testForStrings_null() { assertNullsThrowException(unencodedCharsFunnel()); } public void testForStringsCharset() {
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Mar 19 18:53:45 GMT 2026 - 6.2K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/hash/AbstractNonStreamingHashFunctionTest.java
String s = new String(chars); // this is the correct implementation of the spec for (int i = 0; i < s.length(); i++) { h1.putChar(s.charAt(i)); } h2.putUnencodedChars(s); assertEquals(h1.hash(), h2.hash()); } static class StreamingVersion extends AbstractHashFunction { @Override public int bits() { return 32; } @Override
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Dec 19 18:03:30 GMT 2024 - 4.5K bytes - Click Count (0) -
android/guava/src/com/google/common/hash/AbstractNonStreamingHashFunction.java
@Override public Hasher putBytes(ByteBuffer bytes) { ensureCapacity(bytes.remaining()); buffer.put(bytes); return this; } @Override public Hasher putUnencodedChars(CharSequence charSequence) { ensureCapacity(charSequence.length() * Character.BYTES); for (int i = 0, len = charSequence.length(); i < len; i++) { buffer.putChar(charSequence.charAt(i)); }Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Dec 04 15:39:10 GMT 2025 - 4.8K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/hash/FarmHashFingerprint64Test.java
} public void testStringsConsistency() { for (String s : Arrays.asList("", "some", "test", "strings", "to", "try")) { assertEquals(HASH_FN.newHasher().putUnencodedChars(s).hash(), HASH_FN.hashUnencodedChars(s)); } } public void testUtf8() { char[] charsA = new char[128]; char[] charsB = new char[128]; for (int i = 0; i < charsA.length; i++) {
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Mar 19 18:53:45 GMT 2026 - 6.4K bytes - Click Count (0) -
android/guava/src/com/google/common/hash/HashFunction.java
* perform better than its longhand equivalent, but should not perform worse. * * @since 23.0 */ HashCode hashBytes(ByteBuffer input); /** * Shortcut for {@code newHasher().putUnencodedChars(input).hash()}. The implementation * <i>might</i> perform better than its longhand equivalent, but should not perform worse. Note * that no character encoding is performed; the low byte and high byte of each {@code char} are
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 17 20:26:29 GMT 2025 - 10.9K bytes - Click Count (0) -
android/guava/src/com/google/common/hash/Funnels.java
} private enum UnencodedCharsFunnel implements Funnel<CharSequence> { INSTANCE; @Override public void funnel(CharSequence from, PrimitiveSink into) { into.putUnencodedChars(from); } @Override public String toString() { return "Funnels.unencodedCharsFunnel()"; } } /**
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Jul 17 15:26:41 GMT 2025 - 7.2K bytes - Click Count (0)