Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 217 for pre (0.18 sec)

  1. android/guava/src/com/google/common/util/concurrent/FluentFuture.java

     *
     * <pre>{@code
     * ListenableFuture<Boolean> adminIsLoggedIn =
     *     FluentFuture.from(usersDatabase.getAdminUser())
     *         .transform(User::getId, directExecutor())
     *         .transform(ActivityService::isLoggedIn, threadPool)
     *         .catching(RpcException.class, e -> false, directExecutor());
     * }</pre>
     *
     * <h3>Alternatives</h3>
     *
     * <h4>Frameworks</h4>
     *
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 11 19:08:44 GMT 2023
    - 18.7K bytes
    - Viewed (0)
  2. guava-testlib/src/com/google/common/testing/ClusterException.java

     * presented below:
     *
     * <pre>
     * void runManyThings({@literal List<ThingToRun>} thingsToRun) {
     *   for (ThingToRun thingToRun : thingsToRun) {
     *     thingToRun.run(); // say this may throw an exception, but you want to
     *                       // always run all thingsToRun
     *   }
     * }
     * </pre>
     *
     * <p>This is what the code would become:
     *
     * <pre>
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Apr 26 20:07:17 GMT 2023
    - 4K bytes
    - Viewed (0)
  3. guava/src/com/google/common/base/Throwables.java

       *
       * <pre>
       * for (Foo foo : foos) {
       *   try {
       *     foo.bar();
       *   } catch (BarException | RuntimeException | Error t) {
       *     failure = t;
       *   }
       * }
       * if (failure != null) {
       *   throwIfInstanceOf(failure, BarException.class);
       *   throwIfUnchecked(failure);
       *   throw new AssertionError(failure);
       * }
       * </pre>
       *
       * @since 20.0
       */
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Wed Mar 06 15:38:58 GMT 2024
    - 20.6K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/base/Throwables.java

       *
       * <pre>
       * for (Foo foo : foos) {
       *   try {
       *     foo.bar();
       *   } catch (BarException | RuntimeException | Error t) {
       *     failure = t;
       *   }
       * }
       * if (failure != null) {
       *   throwIfInstanceOf(failure, BarException.class);
       *   throwIfUnchecked(failure);
       *   throw new AssertionError(failure);
       * }
       * </pre>
       *
       * @since 20.0
       */
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Mar 06 15:38:58 GMT 2024
    - 20.6K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/util/concurrent/CycleDetectingLockFactory.java

     * then Lock B, while another thread acquires Lock B, and then Lock A:
     *
     * <pre>
     * Thread1: acquire(LockA) --X acquire(LockB)
     * Thread2: acquire(LockB) --X acquire(LockA)
     * </pre>
     *
     * <p>Neither thread will progress because each is waiting for the other. In more complex
     * applications, cycles can arise from interactions among more than 2 locks:
     *
     * <pre>
     * Thread1: acquire(LockA) --X acquire(LockB)
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Dec 15 19:31:54 GMT 2023
    - 35.9K bytes
    - Viewed (0)
  6. guava/src/com/google/common/collect/ComparisonChain.java

     *
     * <p>Example usage of {@code ComparisonChain}:
     *
     * <pre>{@code
     * public int compareTo(Foo that) {
     *   return ComparisonChain.start()
     *       .compare(this.aString, that.aString)
     *       .compare(this.anInt, that.anInt)
     *       .compare(this.anEnum, that.anEnum, Ordering.natural().nullsLast())
     *       .result();
     * }
     * }</pre>
     *
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Wed Sep 21 17:28:11 GMT 2022
    - 11.2K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/graph/TraverserTest.java

       *
       * <pre>{@code
       * a   c
       * |   |
       * |   |
       * b   d
       * }</pre>
       */
      private static final SuccessorsFunction<Character> TWO_TREES = createDirectedGraph("ab", "cd");
    
      /**
       * A graph consisting of a single root {@code a}:
       *
       * <pre>{@code
       * a
       * }</pre>
       */
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 47.5K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/base/PredicatesTest.java

      @J2ktIncompatible
      @GwtIncompatible // SerializableTester
      public void testIsNull_serialization() {
        Predicate<String> pre = Predicates.isNull();
        Predicate<String> post = SerializableTester.reserializeAndAssert(pre);
        assertEquals(pre.apply("foo"), post.apply("foo"));
        assertEquals(pre.apply(null), post.apply(null));
      }
    
      public void testNotNull_apply() {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 22 17:15:24 GMT 2024
    - 32.4K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/cache/CacheLoader.java

     * overridden as desired.
     *
     * <p>Usage example:
     *
     * <pre>{@code
     * CacheLoader<Key, Graph> loader = new CacheLoader<Key, Graph>() {
     *   public Graph load(Key key) throws AnyException {
     *     return createExpensiveGraph(key);
     *   }
     * };
     * LoadingCache<Key, Graph> cache = CacheBuilder.newBuilder().build(loader);
     * }</pre>
     *
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Dec 19 20:20:14 GMT 2022
    - 9.6K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/Multimap.java

     *
     * <p>The following code:
     *
     * <pre>{@code
     * ListMultimap<String, String> multimap = ArrayListMultimap.create();
     * for (President pres : US_PRESIDENTS_IN_ORDER) {
     *   multimap.put(pres.firstName(), pres.lastName());
     * }
     * for (String firstName : multimap.keySet()) {
     *   List<String> lastNames = multimap.get(firstName);
     *   out.println(firstName + ": " + lastNames);
     * }
     * }</pre>
     *
     * ... produces output such as:
     *
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Sat Jun 17 14:40:53 GMT 2023
    - 15.1K bytes
    - Viewed (0)
Back to top