Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for putUnencodedChars (0.18 sec)

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

                hashFunction.newHasher().putUnencodedChars("abc").hash(),
                hashFunction.newHasher().putUnencodedChars("ab").putUnencodedChars("c").hash(),
                hashFunction.newHasher().putUnencodedChars("a").putUnencodedChars("bc").hash(),
                hashFunction
                    .newHasher()
                    .putUnencodedChars("a")
                    .putUnencodedChars("b")
                    .putUnencodedChars("c")
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:22:54 UTC 2024
    - 25.5K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/hash/AbstractStreamingHasherTest.java

          random.nextBytes(bytes);
          String s = new String(bytes, UTF_16LE); // so all random strings are valid
          assertEquals(
              new Sink(4).putUnencodedChars(s).hash(),
              new Sink(4).putBytes(s.getBytes(UTF_16LE)).hash());
          assertEquals(
              new Sink(4).putUnencodedChars(s).hash(), new Sink(4).putString(s, UTF_16LE).hash());
        }
      }
    
      public void testFloat() {
        Sink sink = new Sink(4);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:22:54 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  3. guava/src/com/google/common/hash/PrimitiveSink.java

       * usually with a charset of UTF-8. For other use cases, use {@code putUnencodedChars}.
       *
       * @since 15.0 (since 11.0 as putString(CharSequence))
       */
      @CanIgnoreReturnValue
      PrimitiveSink putUnencodedChars(CharSequence charSequence);
    
      /**
       * Puts a string into this sink using the given charset.
       *
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Jun 15 20:59:00 UTC 2022
    - 3.9K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/hash/Funnel.java

     *
     * <pre>{@code
     * public enum PersonFunnel implements Funnel<Person> {
     *   INSTANCE;
     *   public void funnel(Person person, PrimitiveSink into) {
     *     into.putUnencodedChars(person.getFirstName())
     *         .putUnencodedChars(person.getLastName())
     *         .putInt(person.getAge());
     *   }
     * }
     * }</pre>
     *
     * @author Dimitris Andreou
     * @since 11.0
     */
    @Beta
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Apr 20 18:43:59 UTC 2021
    - 2.2K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/hash/AbstractByteHasherTest.java

          String s = new String(bytes, UTF_16LE); // so all random strings are valid
          assertEquals(
              new TestHasher().putUnencodedChars(s).hash(),
              new TestHasher().putBytes(s.getBytes(UTF_16LE)).hash());
          assertEquals(
              new TestHasher().putUnencodedChars(s).hash(),
              new TestHasher().putString(s, UTF_16LE).hash());
        }
      }
    
      public void testFloat() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:22:54 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/hash/AbstractByteHasherTest.java

          String s = new String(bytes, UTF_16LE); // so all random strings are valid
          assertEquals(
              new TestHasher().putUnencodedChars(s).hash(),
              new TestHasher().putBytes(s.getBytes(UTF_16LE)).hash());
          assertEquals(
              new TestHasher().putUnencodedChars(s).hash(),
              new TestHasher().putString(s, UTF_16LE).hash());
        }
      }
    
      public void testFloat() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:22:54 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/hash/AbstractHasher.java

      }
    
      @Override
      @CanIgnoreReturnValue
      public final Hasher putFloat(float f) {
        return putInt(Float.floatToRawIntBits(f));
      }
    
      @Override
      @CanIgnoreReturnValue
      public Hasher putUnencodedChars(CharSequence charSequence) {
        for (int i = 0, len = charSequence.length(); i < len; i++) {
          putChar(charSequence.charAt(i));
        }
        return this;
      }
    
      @Override
      @CanIgnoreReturnValue
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Jun 15 20:59:00 UTC 2022
    - 3.5K bytes
    - Viewed (0)
  8. guava/src/com/google/common/hash/AbstractCompositeHashFunction.java

            for (Hasher hasher : hashers) {
              hasher.putChar(c);
            }
            return this;
          }
    
          @Override
          public Hasher putUnencodedChars(CharSequence chars) {
            for (Hasher hasher : hashers) {
              hasher.putUnencodedChars(chars);
            }
            return this;
          }
    
          @Override
          public Hasher putString(CharSequence chars, Charset charset) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 06 00:47:57 UTC 2021
    - 5.4K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/hash/FunnelsTest.java

      }
    
      public void testForStrings() {
        PrimitiveSink primitiveSink = mock(PrimitiveSink.class);
        Funnels.unencodedCharsFunnel().funnel("test", primitiveSink);
        verify(primitiveSink).putUnencodedChars("test");
      }
    
      public void testForStrings_null() {
        assertNullsThrowException(Funnels.unencodedCharsFunnel());
      }
    
      public void testForStringsCharset() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:22:54 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/hash/AbstractStreamingHasherTest.java

          random.nextBytes(bytes);
          String s = new String(bytes, UTF_16LE); // so all random strings are valid
          assertEquals(
              new Sink(4).putUnencodedChars(s).hash(),
              new Sink(4).putBytes(s.getBytes(UTF_16LE)).hash());
          assertEquals(
              new Sink(4).putUnencodedChars(s).hash(), new Sink(4).putString(s, UTF_16LE).hash());
        }
      }
    
      public void testFloat() {
        Sink sink = new Sink(4);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:22:54 UTC 2024
    - 8.5K bytes
    - Viewed (0)
Back to top