Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 246 for unnecessary (0.11 sec)

  1. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 15:00:32 UTC 2024
    - 27.3K bytes
    - Viewed (0)
  2. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 15:00:32 UTC 2024
    - 30.6K 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 15:00:32 UTC 2024
    - 27.3K bytes
    - Viewed (0)
  4. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 10.6K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/math/IntMathTest.java

    import static com.google.common.math.TestPlatform.intsCanGoOutOfRange;
    import static java.lang.Math.min;
    import static java.math.BigInteger.valueOf;
    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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  6. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 16 17:21:56 UTC 2024
    - 18.8K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/math/IntMathTest.java

    import static com.google.common.math.TestPlatform.intsCanGoOutOfRange;
    import static java.lang.Math.min;
    import static java.math.BigInteger.valueOf;
    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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  8. 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));
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 09 16:39:37 UTC 2024
    - 45.2K bytes
    - Viewed (0)
  9. android/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));
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 09 16:39:37 UTC 2024
    - 45.2K bytes
    - Viewed (0)
  10. architecture/standards/0006-use-of-provider-apis-in-gradle.md

        }
    }
    ```
    This is unnecessary because this value is not calculated and cannot be changed.
    
    #### Nested values
    
    This is an inappropriate use of lazy types:
    
    ```groovy
    interface NestedType {
        Property<String> getSomeProperty()
    }
    class Example {
        Property<NestedType> getNestedProperty()
    }
    ```
    
    Registered: Wed Nov 06 11:36:14 UTC 2024
    - Last Modified: Tue Oct 15 20:00:57 UTC 2024
    - 10K bytes
    - Viewed (0)
Back to top