Class Platform

java.lang.Object
com.google.common.base.Platform

final class Platform extends Object
Methods factored out so that they can be emulated differently in GWT.
  • Field Details

    • logger

      private static final Logger logger
    • patternCompiler

      private static final PatternCompiler patternCompiler
  • Constructor Details

    • Platform

      private Platform()
  • Method Details

    • precomputeCharMatcher

      static CharMatcher precomputeCharMatcher(CharMatcher matcher)
    • getEnumIfPresent

      static <T extends Enum<T>> Optional<T> getEnumIfPresent(Class<T> enumClass, String value)
    • formatCompact4Digits

      static String formatCompact4Digits(double value)
    • stringIsNullOrEmpty

      static boolean stringIsNullOrEmpty(@CheckForNull String string)
    • nullToEmpty

      static String nullToEmpty(@CheckForNull String string)
      Returns the string if it is not null, or an empty string otherwise.
      Parameters:
      string - the string to test and possibly return
      Returns:
      string if it is not null; "" otherwise
    • emptyToNull

      @CheckForNull static String emptyToNull(@CheckForNull String string)
      Returns the string if it is not empty, or a null string otherwise.
      Parameters:
      string - the string to test and possibly return
      Returns:
      string if it is not empty; null otherwise
    • compilePattern

      static CommonPattern compilePattern(String pattern)
    • patternCompilerIsPcreLike

      static boolean patternCompilerIsPcreLike()
    • loadPatternCompiler

      private static PatternCompiler loadPatternCompiler()
    • logPatternCompilerError

      private static void logPatternCompilerError(ServiceConfigurationError e)