Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 6 of 6 for saturatedSubtract (0.07 seconds)

The search processing time has exceeded the limit. The displayed results may be partial.

  1. android/guava/src/com/google/common/cache/CacheStats.java

        return new CacheStats(
            max(0, saturatedSubtract(hitCount, other.hitCount)),
            max(0, saturatedSubtract(missCount, other.missCount)),
            max(0, saturatedSubtract(loadSuccessCount, other.loadSuccessCount)),
            max(0, saturatedSubtract(loadExceptionCount, other.loadExceptionCount)),
            max(0, saturatedSubtract(totalLoadTime, other.totalLoadTime)),
            max(0, saturatedSubtract(evictionCount, other.evictionCount)));
      }
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Jul 08 18:32:10 GMT 2025
    - 12.6K bytes
    - Click Count (0)
  2. guava/src/com/google/common/cache/CacheStats.java

        return new CacheStats(
            max(0, saturatedSubtract(hitCount, other.hitCount)),
            max(0, saturatedSubtract(missCount, other.missCount)),
            max(0, saturatedSubtract(loadSuccessCount, other.loadSuccessCount)),
            max(0, saturatedSubtract(loadExceptionCount, other.loadExceptionCount)),
            max(0, saturatedSubtract(totalLoadTime, other.totalLoadTime)),
            max(0, saturatedSubtract(evictionCount, other.evictionCount)));
      }
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Jul 08 18:32:10 GMT 2025
    - 12.6K bytes
    - Click Count (0)
  3. android/guava/src/com/google/common/math/LongMath.java

       *
       * @since 20.0
       */
      // Whenever both tests are cheap and functional, it's faster to use &, | instead of &&, ||
      @SuppressWarnings("ShortCircuitBoolean")
      public static long saturatedSubtract(long a, long b) {
        long naiveDifference = a - b;
        if ((a ^ b) >= 0 | (a ^ naiveDifference) >= 0) {
          // If a and b have the same signs or a has the same sign as the result then there was no
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 09 23:01:02 GMT 2026
    - 46.8K bytes
    - Click Count (0)
  4. guava-tests/test/com/google/common/math/IntMathTest.java

          for (int b : ALL_INTEGER_CANDIDATES) {
            assertOperationEquals(
                a,
                b,
                "s-",
                saturatedCast(valueOf(a).subtract(valueOf(b))),
                IntMath.saturatedSubtract(a, b));
          }
        }
      }
    
      @AndroidIncompatible // slow
      @GwtIncompatible // TODO
      public void testSaturatedMultiply() {
        for (int a : ALL_INTEGER_CANDIDATES) {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Aug 11 19:31:30 GMT 2025
    - 24.1K bytes
    - Click Count (0)
  5. android/guava-tests/test/com/google/common/math/IntMathTest.java

          for (int b : ALL_INTEGER_CANDIDATES) {
            assertOperationEquals(
                a,
                b,
                "s-",
                saturatedCast(valueOf(a).subtract(valueOf(b))),
                IntMath.saturatedSubtract(a, b));
          }
        }
      }
    
      @AndroidIncompatible // slow
      @GwtIncompatible // TODO
      public void testSaturatedMultiply() {
        for (int a : ALL_INTEGER_CANDIDATES) {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Aug 11 19:31:30 GMT 2025
    - 24.1K bytes
    - Click Count (0)
  6. guava-tests/test/com/google/common/math/LongMathTest.java

          for (long b : ALL_LONG_CANDIDATES) {
            assertOperationEquals(
                a,
                b,
                "s-",
                saturatedCast(valueOf(a).subtract(valueOf(b))),
                LongMath.saturatedSubtract(a, b));
          }
        }
      }
    
      @AndroidIncompatible // slow
      @GwtIncompatible // TODO
      public void testSaturatedMultiply() {
        for (long a : ALL_LONG_CANDIDATES) {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Oct 30 14:15:36 GMT 2025
    - 31.4K bytes
    - Click Count (0)
Back to Top