Package com.google.common.base
Class Platform
java.lang.Object
com.google.common.base.Platform
Methods factored out so that they can be emulated differently in GWT.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Loggerprivate static final PatternCompiler -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static void(package private) static CommonPatterncompilePattern(String pattern) (package private) static StringemptyToNull(String string) Returns the string if it is not empty, or a null string otherwise.(package private) static StringformatCompact4Digits(double value) getEnumIfPresent(Class<T> enumClass, String value) private static PatternCompilerprivate static void(package private) static StringnullToEmpty(String string) Returns the string if it is not null, or an empty string otherwise.(package private) static boolean(package private) static CharMatcherprecomputeCharMatcher(CharMatcher matcher) (package private) static booleanstringIsNullOrEmpty(String string) (package private) static longCallsSystem.nanoTime().
-
Field Details
-
logger
-
patternCompiler
-
-
Constructor Details
-
Platform
private Platform()
-
-
Method Details
-
systemNanoTime
static long systemNanoTime()CallsSystem.nanoTime(). -
precomputeCharMatcher
-
getEnumIfPresent
-
formatCompact4Digits
-
stringIsNullOrEmpty
-
nullToEmpty
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
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
-
patternCompilerIsPcreLike
static boolean patternCompilerIsPcreLike() -
loadPatternCompiler
-
logPatternCompilerError
-
checkGwtRpcEnabled
static void checkGwtRpcEnabled()
-