Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for formatCompact4Digits (0.14 sec)

  1. guava-gwt/src-super/com/google/common/base/super/com/google/common/base/Platform.java

        // choosing to turn .precomputed() into a no-op in GWT, because it doesn't
        // seem to be a worthwhile tradeoff in a browser.
        return matcher;
      }
    
      static String formatCompact4Digits(double value) {
        return toPrecision(value, 4);
      }
    
      @JsMethod(name = "Number.prototype.toPrecision.call", namespace = JsPackage.GLOBAL)
      private static native String toPrecision(double value, int precision);
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon May 27 13:56:56 UTC 2024
    - 2K bytes
    - Viewed (0)
  2. guava/src/com/google/common/base/Platform.java

         * `get()`, but that is vanishingly unlikely.
         */
        return ref == null ? Optional.absent() : Optional.fromNullable(enumClass.cast(ref.get()));
      }
    
      static String formatCompact4Digits(double value) {
        return String.format(Locale.ROOT, "%.4g", value);
      }
    
      static boolean stringIsNullOrEmpty(@CheckForNull String string) {
        return string == null || string.isEmpty();
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Apr 15 22:32:14 UTC 2024
    - 3.9K bytes
    - Viewed (0)
  3. guava/src/com/google/common/base/Stopwatch.java

        TimeUnit unit = chooseUnit(nanos);
        double value = (double) nanos / NANOSECONDS.convert(1, unit);
    
        // Too bad this functionality is not exposed as a regular method call
        return Platform.formatCompact4Digits(value) + " " + abbreviate(unit);
      }
    
      private static TimeUnit chooseUnit(long nanos) {
        if (DAYS.convert(nanos, NANOSECONDS) > 0) {
          return DAYS;
        }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 31 14:20:11 UTC 2024
    - 9.3K bytes
    - Viewed (0)
Back to top