Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 40 for getUnchecked (0.14 sec)

  1. guava/src/com/google/common/cache/ForwardingLoadingCache.java

      @Override
      public V get(K key) throws ExecutionException {
        return delegate().get(key);
      }
    
      @CanIgnoreReturnValue // TODO(b/27479612): consider removing this
      @Override
      public V getUnchecked(K key) {
        return delegate().getUnchecked(key);
      }
    
      @CanIgnoreReturnValue // TODO(b/27479612): consider removing this
      @Override
      public ImmutableMap<K, V> getAll(Iterable<? extends K> keys) throws ExecutionException {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Aug 06 17:12:03 UTC 2022
    - 2.9K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/cache/CacheBuilderTest.java

        LoadingCache<String, Integer> cache =
            CacheBuilder.newBuilder().removalListener(countingRemovalListener()).build(loader);
    
        assertEquals(Integer.valueOf(1), cache.getUnchecked("one"));
        assertEquals(1, cache.size());
      }
    
      public void testInitialCapacity_negative() {
        CacheBuilder<Object, Object> builder = CacheBuilder.newBuilder();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 15:00:32 UTC 2024
    - 24.9K bytes
    - Viewed (0)
  3. guava-tests/benchmark/com/google/common/cache/LoadingCacheSingleThreadBenchmark.java

        // value seen so far
        while (cache.getUnchecked(nextRandomKey()) < maximumSize) {}
    
        requests.set(0);
        misses.set(0);
      }
    
      @Benchmark
      int time(int reps) {
        int dummy = 0;
        for (int i = 0; i < reps; i++) {
          dummy += cache.getUnchecked(nextRandomKey());
        }
        requests.addAndGet(reps);
        return dummy;
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Dec 04 17:37:03 UTC 2017
    - 3.4K bytes
    - Viewed (0)
  4. guava/src/com/google/common/util/concurrent/Uninterruptibles.java

       *   <li>To treat {@link InterruptedException} uniformly with other exceptions, use {@link
       *       Futures#getChecked(Future, Class) Futures.getChecked}.
       *   <li>To get uninterruptibility and remove checked exceptions, use {@link
       *       Futures#getUnchecked}.
       * </ul>
       *
       * @throws ExecutionException if the computation threw an exception
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:51:36 UTC 2024
    - 19.1K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/util/concurrent/Uninterruptibles.java

       *   <li>To treat {@link InterruptedException} uniformly with other exceptions, use {@link
       *       Futures#getChecked(Future, Class) Futures.getChecked}.
       *   <li>To get uninterruptibility and remove checked exceptions, use {@link
       *       Futures#getUnchecked}.
       * </ul>
       *
       * @throws ExecutionException if the computation threw an exception
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:51:36 UTC 2024
    - 20.1K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/eventbus/SubscriberRegistry.java

        }
        return methodsInListener;
      }
    
      private static ImmutableList<Method> getAnnotatedMethods(Class<?> clazz) {
        try {
          return subscriberMethodsCache.getUnchecked(clazz);
        } catch (UncheckedExecutionException e) {
          if (e.getCause() instanceof IllegalArgumentException) {
            /*
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 15:16:45 UTC 2024
    - 10.8K bytes
    - Viewed (0)
  7. guava/src/com/google/common/util/concurrent/UncheckedExecutionException.java

       * (Perhaps it should also have required that its cause was a RuntimeException. However, that
       * would have required that we throw a different kind of exception for wrapping *checked*
       * exceptions in methods like Futures.getUnchecked and LoadingCache.get.)
       */
    
      /**
       * Creates a new instance with {@code null} as its detail message and no cause.
       *
       * @deprecated Prefer {@linkplain UncheckedExecutionException(Throwable)} a constructor that
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Mar 07 17:52:19 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  8. guava-gwt/src-super/com/google/common/cache/super/com/google/common/cache/LocalCache.java

          return localCache.getOrLoad(key);
        }
    
        @Override
        public V getUnchecked(K key) {
          try {
            return get(key);
          } catch (ExecutionException e) {
            throw new UncheckedExecutionException(e.getCause());
          }
        }
    
        @Override
        public final V apply(K key) {
          return getUnchecked(key);
        }
    
        @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Feb 27 19:19:19 UTC 2024
    - 21.6K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/util/concurrent/Futures.java

          throw new UncheckedExecutionException(wrapper.getCause());
        }
      }
    
      /*
       * Arguably we don't need a timed getUnchecked because any operation slow enough to require a
       * timeout is heavyweight enough to throw a checked exception and therefore be inappropriate to
       * use with getUnchecked. Further, it's not clear that converting the checked TimeoutException to
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 25 13:13:32 UTC 2024
    - 64.7K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/cache/CacheBuilderSpecTest.java

        Object key = new Object();
        Object value = new Object();
        LoadingCache<Object, Object> cache =
            builder.build(CacheLoader.from(Suppliers.ofInstance(value)));
        assertSame(value, cache.getUnchecked(key));
        assertEquals(0, cache.size());
        assertFalse(cache.asMap().containsKey(key));
      }
    
      public void testCacheBuilderFrom_string() {
        CacheBuilder<?, ?> fromString =
            CacheBuilder.from(
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 19.1K bytes
    - Viewed (0)
Back to top