Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for examples (0.17 sec)

  1. guava-tests/test/com/google/common/util/concurrent/FuturesTest.java

        future2 = null;
        // No references to list or other output future, second future should be unreferenced
        GcFinalization.awaitClear(future2Ref);
        outputFuture1.get();
      }
    
      // Mostly an example of how it would look like to use a list of mixed types
      @J2ktIncompatible // Wildcard generics
      public void testCompletionOrderMixedBagOTypes() throws Exception {
        SettableFuture<Long> future1 = SettableFuture.create();
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 144.5K bytes
    - Viewed (0)
  2. guava/src/com/google/common/cache/LocalCache.java

         * concurrent read operation to see inconsistent data. This is made easier by the nature of the
         * read operations in Map. For example, no operation can reveal that the table has grown but the
         * threshold has not yet been updated, so there are no atomicity requirements for this with
         * respect to reads.
         *
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 17:40:56 GMT 2024
    - 150.3K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/util/concurrent/FuturesTest.java

        future2 = null;
        // No references to list or other output future, second future should be unreferenced
        GcFinalization.awaitClear(future2Ref);
        outputFuture1.get();
      }
    
      // Mostly an example of how it would look like to use a list of mixed types
      @J2ktIncompatible // Wildcard generics
      public void testCompletionOrderMixedBagOTypes() throws Exception {
        SettableFuture<Long> future1 = SettableFuture.create();
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 144.5K bytes
    - Viewed (0)
  4. guava-tests/benchmark/com/google/common/base/CharMatcherBenchmark.java

        }
        return builder.toString();
      }
    
      private static char randomCharFrom(String s, Random rand) {
        return s.charAt(rand.nextInt(s.length()));
      }
    
      /**
       * Provides samples on a random distribution derived from the web.
       *
       * <p>Adapted from data provided by Mark Davis.
       *
       * @author Christopher Swenson
       */
      static class CharSamples {
    
        static {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 194.8K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/util/concurrent/ClosingFuture.java

     *         .transform((closer, result) -> result.get("userName"), directExecutor())
     *         .catching(DBException.class, e -> "no user", directExecutor())
     *         .finishToFuture();
     * }</pre>
     *
     * In this example, when the {@code userName} {@link Future} is done, the transaction and the query
     * result cursor will both be closed, even if the operation is cancelled or fails.
     *
     * <h4>Manually closing</h4>
     *
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 98.5K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/collect/Maps.java

       * other words, each input value produces an entry in the map whose key is the result of applying
       * {@code keyFunction} to that value. These entries appear in the same order as the input values.
       * Example usage:
       *
       * <pre>{@code
       * Color red = new Color("red", 255, 0, 0);
       * ...
       * ImmutableSet<Color> allColors = ImmutableSet.of(red, green, blue);
       *
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 159.6K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/cache/LocalCache.java

         * concurrent read operation to see inconsistent data. This is made easier by the nature of the
         * read operations in Map. For example, no operation can reveal that the table has grown but the
         * threshold has not yet been updated, so there are no atomicity requirements for this with
         * respect to reads.
         *
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 17:40:56 GMT 2024
    - 144.7K bytes
    - Viewed (0)
  8. android/guava-tests/benchmark/com/google/common/base/CharMatcherBenchmark.java

        }
        return builder.toString();
      }
    
      private static char randomCharFrom(String s, Random rand) {
        return s.charAt(rand.nextInt(s.length()));
      }
    
      /**
       * Provides samples on a random distribution derived from the web.
       *
       * <p>Adapted from data provided by Mark Davis.
       *
       * @author Christopher Swenson
       */
      static class CharSamples {
    
        static {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 194.8K bytes
    - Viewed (0)
Back to top