Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 26 for alternative (0.17 sec)

  1. guava/src/com/google/common/base/Optional.java

     * might be absent" as two distinct types in your program, which can aid clarity.
     *
     * <p>Some uses of this class include
     *
     * <ul>
     *   <li>As a method return type, as an alternative to returning {@code null} to indicate that no
     *       value was available
     *   <li>To distinguish between "unknown" (for example, not present in a map) and "known to have no
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 14.6K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/base/Suppliers.java

      @IgnoreJRERequirement
      public static <T extends @Nullable Object> Supplier<T> memoizeWithExpiration(
          Supplier<T> delegate, Duration duration) {
        checkNotNull(delegate);
        // The alternative of `duration.compareTo(Duration.ZERO) > 0` causes J2ObjC trouble.
        checkArgument(
            !duration.isNegative() && !duration.isZero(), "duration (%s) must be > 0", duration);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 15.3K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/math/IntMath.java

       * method is overflow resilient.
       *
       * @since 14.0
       */
      public static int mean(int x, int y) {
        // Efficient method for computing the arithmetic mean.
        // The alternative (x + y) / 2 fails for large values.
        // The alternative (x + y) >>> 1 fails for negative values.
        return (x & y) + ((x ^ y) >> 1);
      }
    
      /**
       * Returns {@code true} if {@code n} is a <a
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 23.5K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/base/Optional.java

     * might be absent" as two distinct types in your program, which can aid clarity.
     *
     * <p>Some uses of this class include
     *
     * <ul>
     *   <li>As a method return type, as an alternative to returning {@code null} to indicate that no
     *       value was available
     *   <li>To distinguish between "unknown" (for example, not present in a map) and "known to have no
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 13K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/math/LongMath.java

       * method is resilient to overflow.
       *
       * @since 14.0
       */
      public static long mean(long x, long y) {
        // Efficient method for computing the arithmetic mean.
        // The alternative (x + y) / 2 fails for large values.
        // The alternative (x + y) >>> 1 fails for negative values.
        return (x & y) + ((x ^ y) >> 1);
      }
    
      /*
       * This bitmask is used as an optimization for cheaply testing for divisibility by 2, 3, or 5.
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 44.6K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/util/concurrent/GeneratedMonitorTest.java

            } catch (InvocationTargetException e) {
              assertEquals(IllegalMonitorStateException.class, e.getTargetException().getClass());
            }
          }
        };
      }
    
      /** Alternative to AssertionError(String, Throwable), which doesn't exist in Java 1.6 */
      private static AssertionError newAssertionError(String message, Throwable cause) {
        AssertionError e = new AssertionError(message);
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Mon Apr 17 14:48:57 GMT 2023
    - 27.4K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/base/Converter.java

     *       return Integer.toHexString(i);
     *     }
     *
     *     protected Integer doBackward(String s) {
     *       return parseUnsignedInt(s, 16);
     *     }
     *   };</pre>
     *
     * <p>An alternative using Java 8:
     *
     * <pre>{@code
     * return Converter.from(
     *     Integer::toHexString,
     *     s -> parseUnsignedInt(s, 16));
     * }</pre>
     *
     * @author Mike Ward
     * @author Kurt Alfred Kluever
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 23K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/util/concurrent/GeneratedMonitorTest.java

            } catch (InvocationTargetException e) {
              assertEquals(IllegalMonitorStateException.class, e.getTargetException().getClass());
            }
          }
        };
      }
    
      /** Alternative to AssertionError(String, Throwable), which doesn't exist in Java 1.6 */
      private static AssertionError newAssertionError(String message, Throwable cause) {
        AssertionError e = new AssertionError(message);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 17 14:48:57 GMT 2023
    - 26.1K bytes
    - Viewed (0)
  9. guava/src/com/google/common/base/Converter.java

     *       return Integer.toHexString(i);
     *     }
     *
     *     protected Integer doBackward(String s) {
     *       return parseUnsignedInt(s, 16);
     *     }
     *   };</pre>
     *
     * <p>An alternative using Java 8:
     *
     * <pre>{@code
     * return Converter.from(
     *     Integer::toHexString,
     *     s -> parseUnsignedInt(s, 16));
     * }</pre>
     *
     * @author Mike Ward
     * @author Kurt Alfred Kluever
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 23K bytes
    - Viewed (1)
  10. android/guava/src/com/google/common/util/concurrent/FluentFuture.java

     *         .transform(User::getId, directExecutor())
     *         .transform(ActivityService::isLoggedIn, threadPool)
     *         .catching(RpcException.class, e -> false, directExecutor());
     * }</pre>
     *
     * <h3>Alternatives</h3>
     *
     * <h4>Frameworks</h4>
     *
     * <p>When chaining together a graph of asynchronous operations, you will often find it easier to
    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)
Back to top