@Test public void test_defaultIfNull() { assertThat(defaultIfNull("foo", "bar")).isEqualTo("foo"); assertThat(defaultIfNull("", "bar")).isEqualTo(""); assertThat(defaultIfNull(" ", "bar")).isEqualTo(" "); assertThat(defaultIfNull(null, "bar")).isEqualTo("bar"); assertThat(defaultIfNull(3L, 4L)).isEqualTo(3L); assertThat(defaultIfNull(null, 4L)).isEqualTo(4L); }
@CheckForNull public static <T> T defaultIfNull(@Nullable T object, @Nullable T defaultValue) { return object != null ? object : defaultValue; }
OrchestratorUtils { @CheckForNull public static <T> T defaultIfNull(@Nullable T object, @Nullable T defaultValue) { return object != null ? object : defaultValue; } }
OrchestratorUtils { @CheckForNull public static <T> T defaultIfNull(@Nullable T object, @Nullable T defaultValue) { return object != null ? object : defaultValue; } private  OrchestratorUtils(); }
OrchestratorUtils { @CheckForNull public static <T> T defaultIfNull(@Nullable T object, @Nullable T defaultValue) { return object != null ? object : defaultValue; } private  OrchestratorUtils(); static void checkArgument(boolean expression, String errorMessageTemplate, @Nullable Object... errorMessageArgs); static void checkState(boolean expression, String errorMessageTemplate, @Nullable Object... errorMessageArgs); @CheckForNull static String defaultIfEmpty(@Nullable String object, @Nullable String defaultValue); @CheckForNull static T defaultIfNull(@Nullable T object, @Nullable T defaultValue); static boolean isEmpty(@Nullable String str); }
OrchestratorUtils { @CheckForNull public static <T> T defaultIfNull(@Nullable T object, @Nullable T defaultValue) { return object != null ? object : defaultValue; } private  OrchestratorUtils(); static void checkArgument(boolean expression, String errorMessageTemplate, @Nullable Object... errorMessageArgs); static void checkState(boolean expression, String errorMessageTemplate, @Nullable Object... errorMessageArgs); @CheckForNull static String defaultIfEmpty(@Nullable String object, @Nullable String defaultValue); @CheckForNull static T defaultIfNull(@Nullable T object, @Nullable T defaultValue); static boolean isEmpty(@Nullable String str);  }