Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 39 for putLong (0.21 sec)

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

      }
    
      public void testForLongs() {
        Long value = 1234L;
        PrimitiveSink primitiveSink = mock(PrimitiveSink.class);
        Funnels.longFunnel().funnel(value, primitiveSink);
        verify(primitiveSink).putLong(1234);
      }
    
      public void testForLongs_null() {
        assertNullsThrowException(Funnels.longFunnel());
      }
    
      public void testSequential() {
        @SuppressWarnings({"unchecked", "DoNotMock"})
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Oct 02 16:24:50 GMT 2020
    - 5.9K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/hash/AbstractNonStreamingHashFunction.java

      }
    
      @Override
      public HashCode hashLong(long input) {
        return hashBytes(ByteBuffer.allocate(8).order(ByteOrder.LITTLE_ENDIAN).putLong(input).array());
      }
    
      @Override
      public HashCode hashUnencodedChars(CharSequence input) {
        int len = input.length();
        ByteBuffer buffer = ByteBuffer.allocate(len * 2).order(ByteOrder.LITTLE_ENDIAN);
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 20 18:43:59 GMT 2021
    - 3.8K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/hash/AbstractByteHasherTest.java

        TestHasher hasher = new TestHasher();
        hasher.putInt(0x04030201);
        hasher.assertBytes(new byte[] {1, 2, 3, 4});
      }
    
      public void testLong() {
        TestHasher hasher = new TestHasher();
        hasher.putLong(0x0807060504030201L);
        hasher.assertBytes(new byte[] {1, 2, 3, 4, 5, 6, 7, 8});
      }
    
      public void testChar() {
        TestHasher hasher = new TestHasher();
        hasher.putChar((char) 0x0201);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 3.8K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/hash/AbstractHashFunction.java

      }
    
      @Override
      public HashCode hashInt(int input) {
        return newHasher(4).putInt(input).hash();
      }
    
      @Override
      public HashCode hashLong(long input) {
        return newHasher(8).putLong(input).hash();
      }
    
      @Override
      public HashCode hashBytes(byte[] input) {
        return hashBytes(input, 0, input.length);
      }
    
      @Override
      public HashCode hashBytes(byte[] input, int off, int len) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 20 18:43:59 GMT 2021
    - 2.5K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/hash/AbstractByteHasherTest.java

        TestHasher hasher = new TestHasher();
        hasher.putInt(0x04030201);
        hasher.assertBytes(new byte[] {1, 2, 3, 4});
      }
    
      public void testLong() {
        TestHasher hasher = new TestHasher();
        hasher.putLong(0x0807060504030201L);
        hasher.assertBytes(new byte[] {1, 2, 3, 4, 5, 6, 7, 8});
      }
    
      public void testChar() {
        TestHasher hasher = new TestHasher();
        hasher.putChar((char) 0x0201);
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 3.8K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/hash/Murmur3Hash128Test.java

      private static HashCode toHashCode(long... longs) {
        ByteBuffer bb = ByteBuffer.wrap(new byte[longs.length * 8]).order(ByteOrder.LITTLE_ENDIAN);
        for (long x : longs) {
          bb.putLong(x);
        }
        return HashCode.fromBytes(bb.array());
      }
    
      public void testParanoid() {
        HashFn hf =
            new HashFn() {
              @Override
              public byte[] hash(byte[] input, int seed) {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.2K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/hash/HashFunction.java

       * instance that is ready to receive data. Example:
       *
       * <pre>{@code
       * HashFunction hf = Hashing.md5();
       * HashCode hc = hf.newHasher()
       *     .putLong(id)
       *     .putBoolean(isActive)
       *     .hash();
       * }</pre>
       */
      Hasher newHasher();
    
      /**
       * Begins a new hash code computation as {@link #newHasher()}, but provides a hint of the expected
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue May 25 18:22:59 GMT 2021
    - 10.9K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/hash/FarmHashFingerprint64Test.java

        hasher = HASH_FN.newHasher();
        hasher.putBytes(new byte[] {0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00});
        assertEquals(hashCode, hasher.hash().asLong());
    
        hasher = HASH_FN.newHasher();
        hasher.putLong(0x0000000001000101L);
        assertEquals(hashCode, hasher.hash().asLong());
    
        hasher = HASH_FN.newHasher();
        hasher
            .putShort((short) 0x0101)
            .putShort((short) 0x0100)
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Jul 19 14:00:24 GMT 2016
    - 6.2K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/hash/Funnels.java

        return LongFunnel.INSTANCE;
      }
    
      private enum LongFunnel implements Funnel<Long> {
        INSTANCE;
    
        @Override
        public void funnel(Long from, PrimitiveSink into) {
          into.putLong(from);
        }
    
        @Override
        public String toString() {
          return "Funnels.longFunnel()";
        }
      }
    
      /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed May 25 20:32:46 GMT 2022
    - 7.3K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/hash/Fingerprint2011Test.java

        hasher = HASH_FN.newHasher();
        hasher.putBytes(new byte[] {0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00});
        assertEquals(hashCode, hasher.hash().asLong());
    
        hasher = HASH_FN.newHasher();
        hasher.putLong(0x0000000001000101L);
        assertEquals(hashCode, hasher.hash().asLong());
    
        hasher = HASH_FN.newHasher();
        hasher
            .putShort((short) 0x0101)
            .putShort((short) 0x0100)
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Dec 29 14:55:25 GMT 2021
    - 7.6K bytes
    - Viewed (0)
Back to top