Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 224 for unnecessary (0.23 sec)

  1. guava-tests/test/com/google/common/math/LongMathTest.java

          } catch (ArithmeticException expected) {
            // do nothing
          }
    
          if (expectedDouble != null) {
            assertThat(LongMath.roundToDouble(candidate, UNNECESSARY)).isEqualTo(expectedDouble);
          } else {
            assertThrows(
                ArithmeticException.class, () -> LongMath.roundToDouble(candidate, UNNECESSARY));
          }
        }
      }
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Aug 11 19:31:30 UTC 2025
    - 31.4K bytes
    - Viewed (0)
  2. guava/src/com/google/common/math/BigIntegerMath.java

       *     is not a power of two
       */
      @SuppressWarnings("fallthrough")
      // TODO(kevinb): remove after this warning is disabled globally
      public static int log2(BigInteger x, RoundingMode mode) {
        checkPositive("x", checkNotNull(x));
        int logFloor = x.bitLength() - 1;
        switch (mode) {
          case UNNECESSARY:
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 18.8K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/math/DoubleMathTest.java

          // every mode except UNNECESSARY
          BigDecimal expected = new BigDecimal(d).setScale(0, UNNECESSARY);
          boolean isInBounds =
              expected.compareTo(MAX_LONG_AS_BIG_DECIMAL) <= 0
                  & expected.compareTo(MIN_LONG_AS_BIG_DECIMAL) >= 0;
    
          try {
            assertEquals(expected.longValue(), DoubleMath.roundToLong(d, UNNECESSARY));
            assertTrue(isInBounds);
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 27.3K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/math/BigIntegerMathTest.java

                .isEqualTo(expectation);
          }
    
          if (!expectedValues.containsKey(UNNECESSARY)) {
            assertWithMessage("Expected roundUnnecessaryShouldThrow call")
                .that(unnecessaryShouldThrow)
                .isTrue();
            assertThrows(
                ArithmeticException.class, () -> BigIntegerMath.roundToDouble(input, UNNECESSARY));
          }
        }
      }
    
      @J2ktIncompatible
      @GwtIncompatible
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 27K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/math/IntMathTest.java

    import static java.lang.Math.min;
    import static java.math.BigInteger.valueOf;
    import static java.math.RoundingMode.DOWN;
    import static java.math.RoundingMode.FLOOR;
    import static java.math.RoundingMode.UNNECESSARY;
    
    import com.google.common.annotations.GwtCompatible;
    import com.google.common.annotations.GwtIncompatible;
    import com.google.common.annotations.J2ktIncompatible;
    import com.google.common.testing.NullPointerTester;
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Aug 11 19:31:30 UTC 2025
    - 24.1K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/math/BigDecimalMathTest.java

          if (!expectedValues.containsKey(UNNECESSARY)) {
            assertWithMessage("Expected roundUnnecessaryShouldThrow call")
                .that(unnecessaryShouldThrow)
                .isTrue();
            assertThrows(
                "Expected ArithmeticException for roundToDouble(" + input + ", UNNECESSARY)",
                ArithmeticException.class,
                () -> BigDecimalMath.roundToDouble(input, UNNECESSARY));
          }
        }
      }
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Jul 14 14:44:08 UTC 2025
    - 10.9K bytes
    - Viewed (0)
  7. guava/src/com/google/common/math/LongMath.java

       * @throws ArithmeticException if {@code mode} is {@link RoundingMode#UNNECESSARY} and {@code x}
       *     is not a power of two
       */
      @SuppressWarnings("fallthrough")
      // TODO(kevinb): remove after this warning is disabled globally
      public static int log2(long x, RoundingMode mode) {
        checkPositive("x", x);
        switch (mode) {
          case UNNECESSARY:
            checkRoundingUnnecessary(isPowerOfTwo(x));
          // fall through
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Fri Aug 29 16:20:07 UTC 2025
    - 46.8K bytes
    - Viewed (0)
  8. guava/src/com/google/common/base/Objects.java

       * </ul>
       *
       * <p>This assumes that any non-null objects passed to this function conform to the {@code
       * equals()} contract.
       *
       * <p><b>Note:</b> this method is now unnecessary and should be treated as deprecated; use {@link
       * java.util.Objects#equals} instead.
       */
      @SuppressWarnings("InlineMeSuggester") // would introduce fully qualified references to Objects
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Jul 28 22:51:26 UTC 2025
    - 3.1K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/math/BigDecimalMath.java

       * values are even integers; this method returns the one that is a multiple of a greater power of
       * two.)
       *
       * @throws ArithmeticException if {@code mode} is {@link RoundingMode#UNNECESSARY} and {@code x}
       *     is not precisely representable as a {@code double}
       * @since 30.0
       */
      public static double roundToDouble(BigDecimal x, RoundingMode mode) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Jul 17 15:26:41 UTC 2025
    - 3K bytes
    - Viewed (0)
  10. guava/src/com/google/common/collect/ImmutableMapEntry.java

     * not its subclasses) can be reused when copied from one ImmutableMap to another.
     *
     * @author Louis Wasserman
     */
    @GwtIncompatible // unnecessary
    class ImmutableMapEntry<K, V> extends SimpleImmutableEntry<K, V> {
      /**
       * Creates an {@code ImmutableMapEntry} array to hold parameterized entries. The result must never
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue Jul 01 21:42:29 UTC 2025
    - 4.6K bytes
    - Viewed (0)
Back to top