Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 145 for pre (0.14 sec)

  1. 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)
  2. 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 May 03 12:43:13 GMT 2024
    - Last Modified: Wed Mar 06 15:38:58 GMT 2024
    - 20.6K bytes
    - Viewed (0)
  3. 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)
  4. 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)
  5. 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 May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 17:15:24 GMT 2024
    - 32.4K bytes
    - Viewed (0)
  6. 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 May 03 12:43:13 GMT 2024
    - Last Modified: Sat Jun 17 14:40:53 GMT 2023
    - 15.1K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/Comparators.java

       * are broken arbitrarily.
       *
       * <p>For example:
       *
       * <pre>{@code
       * Stream.of("foo", "quux", "banana", "elephant")
       *     .collect(least(2, comparingInt(String::length)))
       * // returns {"foo", "quux"}
       * }</pre>
       *
       * <p>This {@code Collector} uses O(k) memory and takes expected time O(n) (worst-case O(n log
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed May 01 18:44:57 GMT 2024
    - 10.2K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/util/concurrent/Monitor.java

     * followed immediately by a <i>try/finally</i> block to ensure that the current thread leaves the
     * monitor cleanly:
     *
     * <pre>{@code
     * monitor.enter();
     * try {
     *   // do things while occupying the monitor
     * } finally {
     *   monitor.leave();
     * }
     * }</pre>
     *
     * <p>A call to any of the <i>enter</i> methods with <b>boolean</b> return type should always appear
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Dec 04 18:22:01 GMT 2023
    - 38.6K bytes
    - Viewed (0)
  9. android/guava-testlib/src/com/google/common/testing/GcFinalization.java

     * final WeakHashMap<Object, Object> map = new WeakHashMap<>();
     * map.put(new Object(), Boolean.TRUE);
     * GcFinalization.awaitDone(new FinalizationPredicate() {
     *   public boolean isDone() {
     *     return map.isEmpty();
     *   }
     * });
     * }</pre>
     *
     * <p>Even if your non-test code does not use finalization, you can use this class to test for
     * leaks, by ensuring that objects are no longer strongly referenced:
     *
     * <pre>{@code
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 17:40:56 GMT 2024
    - 11.6K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/io/Closeables.java

       * not propagated (otherwise the original exception will be lost).
       *
       * <p>If {@code swallowIOException} is true then we never throw {@code IOException} but merely log
       * it.
       *
       * <p>Example:
       *
       * <pre>{@code
       * public void useStreamNicely() throws IOException {
       *   SomeStream stream = new SomeStream("foo");
       *   boolean threw = true;
       *   try {
       *     // ... code which does something with the stream ...
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed May 17 14:35:11 GMT 2023
    - 4.7K bytes
    - Viewed (0)
Back to top