Package com.google.common.base
Class Platform
- java.lang.Object
-
- com.google.common.base.Platform
-
final class Platform extends java.lang.ObjectMethods factored out so that they can be emulated differently in GWT.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classPlatform.JdkPatternCompiler
-
Field Summary
Fields Modifier and Type Field Description private static java.util.logging.Loggerloggerprivate static PatternCompilerpatternCompiler
-
Constructor Summary
Constructors Modifier Constructor Description privatePlatform()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static voidcheckGwtRpcEnabled()(package private) static CommonPatterncompilePattern(java.lang.String pattern)(package private) static java.lang.StringemptyToNull(java.lang.String string)Returns the string if it is not empty, or a null string otherwise.(package private) static java.lang.StringformatCompact4Digits(double value)(package private) static <T extends java.lang.Enum<T>>
Optional<T>getEnumIfPresent(java.lang.Class<T> enumClass, java.lang.String value)private static PatternCompilerloadPatternCompiler()private static voidlogPatternCompilerError(java.util.ServiceConfigurationError e)(package private) static java.lang.StringnullToEmpty(java.lang.String string)Returns the string if it is not null, or an empty string otherwise.(package private) static booleanpatternCompilerIsPcreLike()(package private) static CharMatcherprecomputeCharMatcher(CharMatcher matcher)(package private) static booleanstringIsNullOrEmpty(java.lang.String string)(package private) static longsystemNanoTime()CallsSystem.nanoTime().
-
-
-
Field Detail
-
logger
private static final java.util.logging.Logger logger
-
patternCompiler
private static final PatternCompiler patternCompiler
-
-
Method Detail
-
systemNanoTime
static long systemNanoTime()
CallsSystem.nanoTime().
-
precomputeCharMatcher
static CharMatcher precomputeCharMatcher(CharMatcher matcher)
-
getEnumIfPresent
static <T extends java.lang.Enum<T>> Optional<T> getEnumIfPresent(java.lang.Class<T> enumClass, java.lang.String value)
-
formatCompact4Digits
static java.lang.String formatCompact4Digits(double value)
-
stringIsNullOrEmpty
static boolean stringIsNullOrEmpty(@CheckForNull java.lang.String string)
-
nullToEmpty
static java.lang.String nullToEmpty(@CheckForNull java.lang.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:
stringif it is not null;""otherwise
-
emptyToNull
@CheckForNull static java.lang.String emptyToNull(@CheckForNull java.lang.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:
stringif it is not empty;nullotherwise
-
compilePattern
static CommonPattern compilePattern(java.lang.String pattern)
-
patternCompilerIsPcreLike
static boolean patternCompilerIsPcreLike()
-
loadPatternCompiler
private static PatternCompiler loadPatternCompiler()
-
logPatternCompilerError
private static void logPatternCompilerError(java.util.ServiceConfigurationError e)
-
checkGwtRpcEnabled
static void checkGwtRpcEnabled()
-
-