Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 102 for Rashed (0.16 sec)

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

      }
    
      public void testHashIntVsForLoop() {
        int input = 42;
        HashCode expected = Hashing.md5().hashInt(input);
    
        Hasher hasher = Hashing.md5().newHasher();
        for (int i = 0; i < 32; i += 8) {
          hasher.putByte((byte) (input >> i));
        }
        HashCode actual = hasher.hash();
    
        assertEquals(expected, actual);
      }
    
      private static final String EMPTY_STRING = "";
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 26.5K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/hash/HashTestUtils.java

      }
    
      static HashCode randomHash(HashFunction hashFunction, Random random, int numActions) {
        Hasher hasher = hashFunction.newHasher();
        for (int i = 0; i < numActions; i++) {
          RandomHasherAction.pickAtRandom(random).performAction(random, ImmutableSet.of(hasher));
        }
        return hasher.hash();
      }
    
      private static void assertShortcutsAreEquivalent(HashFunction hashFunction, int trials) {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 25.3K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/hash/Hasher.java

     */
    @Beta
    @ElementTypesAreNonnullByDefault
    public interface Hasher extends PrimitiveSink {
      @CanIgnoreReturnValue
      @Override
      Hasher putByte(byte b);
    
      @CanIgnoreReturnValue
      @Override
      Hasher putBytes(byte[] bytes);
    
      @CanIgnoreReturnValue
      @Override
      Hasher putBytes(byte[] bytes, int off, int len);
    
      @CanIgnoreReturnValue
      @Override
      Hasher putBytes(ByteBuffer bytes);
    
      @CanIgnoreReturnValue
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Jun 15 20:59:00 GMT 2022
    - 5.5K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/hash/Murmur3_32HashFunction.java

        @CanIgnoreReturnValue
        @Override
        public Hasher putInt(int i) {
          update(4, i);
          return this;
        }
    
        @CanIgnoreReturnValue
        @Override
        public Hasher putLong(long l) {
          update(4, (int) l);
          update(4, l >>> 32);
          return this;
        }
    
        @CanIgnoreReturnValue
        @Override
        public Hasher putChar(char c) {
          update(2, c);
          return this;
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Jun 15 20:59:00 GMT 2022
    - 11.9K bytes
    - Viewed (0)
  5. guava/src/com/google/common/base/Suppliers.java

        }
      }
    
      /**
       * Returns a supplier that caches the instance supplied by the delegate and removes the cached
       * value after the specified time has passed. Subsequent calls to {@code get()} return the cached
       * value if the expiration time has not passed. After the expiration time, a new value is
       * retrieved, cached, and returned. See: <a
       * href="http://en.wikipedia.org/wiki/Memoization">memoization</a>
       *
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 15.3K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/cache/PopulatedCachesTest.java

     *
     * @author mike nonemacher
     */
    
    public class PopulatedCachesTest extends TestCase {
      // we use integers as keys; make sure the range covers some values that ARE cached by
      // Integer.valueOf(int), and some that are not cached. (127 is the highest cached value.)
      static final int WARMUP_MIN = 120;
      static final int WARMUP_MAX = 135;
      static final int WARMUP_SIZE = WARMUP_MAX - WARMUP_MIN;
    
      public void testSize_populated() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 15K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/cache/CacheBuilderTest.java

       * each computation is affected by a call to {@code clear()} (and therefore gets passed to the
       * removal listener), or else is not affected by the {@code clear()} (and therefore exists in the
       * cache afterward).
       */
      @GwtIncompatible // QueuingRemovalListener
    
      public void testRemovalNotification_clear_basher() throws InterruptedException {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Oct 03 20:10:02 GMT 2023
    - 23.2K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/util/concurrent/CycleDetectingLockFactoryTest.java

        firstException = expected;
        // Second time should also fail, with a cached causal chain.
        expected = assertThrows(PotentialDeadlockException.class, () -> lockA.lock());
        checkMessage(expected, "LockB -> LockA", "LockA -> LockB");
        // The causal chain should be cached.
        assertSame(firstException.getCause(), expected.getCause());
        // lockA should work after lockB is released.
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 16.1K bytes
    - Viewed (1)
  9. android/guava/src/com/google/common/util/concurrent/FuturesGetChecked.java

          /*
           * Static final fields are presumed to be fastest, based on our experience with
           * UnsignedBytesBenchmark. TODO(cpovirk): benchmark this
           */
          /*
           * A CopyOnWriteArraySet<WeakReference> is faster than a newSetFromMap of a MapMaker map with
           * weakKeys() and concurrencyLevel(1), even up to at least 12 cached exception types.
           */
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Dec 14 20:35:03 GMT 2023
    - 10.3K bytes
    - Viewed (0)
  10. guava/src/com/google/common/collect/CompactHashMap.java

       * implementation. Experimentally determined.
       */
      private static final int MAX_HASH_BUCKET_LENGTH = 9;
    
      // The way the `table`, `entries`, `keys`, and `values` arrays work together is as follows.
      //
      // The `table` array always has a size that is a power of 2. The hashcode of a key in the map
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Jun 26 21:02:13 GMT 2023
    - 39.8K bytes
    - Viewed (0)
Back to top