Skip to content

Instantly share code, notes, and snippets.

@frankbenoit
Created December 14, 2016 16:33
Show Gist options
  • Save frankbenoit/d1da35168c775fd8466cfa4a093d3038 to your computer and use it in GitHub Desktop.
Save frankbenoit/d1da35168c775fd8466cfa4a093d3038 to your computer and use it in GitHub Desktop.
class StringUtils {
public String ensureNonNull( @Nullable String str )
public static boolean hasContent(@Nullable String str)
public static String toString(@Nullable Object o) {
public static String hasContentOrElse(String str, String elseValue )
public static String hasContentOrCompute(String str, Supplier<String> elseValue )
public static boolean equalsIgnoreCase(@Nullable String str1, @Nullable String str2)
public static boolean startsWith(@Nullable String string, String prefix)
// ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment