Class StringHelper


  • public class StringHelper
    extends java.lang.Object
    INTERNAL:

    Purpose: Define any useful String constants and methods that are missing from the base Java.

    • Constructor Summary

      Constructors 
      Constructor Description
      StringHelper()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean isBlank​(java.lang.String str)
      Checks if String is null, is empty ("") or contains white spaces only.
      static java.lang.String nonNullString​(java.lang.String str)
      Never return null but replace it with "null" String.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • StringHelper

        public StringHelper()
    • Method Detail

      • nonNullString

        public static final java.lang.String nonNullString​(java.lang.String str)
        Never return null but replace it with "null" String.
        Parameters:
        str - String to be checked for null and eventually replaced with "null" String.
        Returns:
        Provided string when not null or "null" String.
      • isBlank

        public static final boolean isBlank​(java.lang.String str)
        Checks if String is null, is empty ("") or contains white spaces only.
        Parameters:
        str - String to be checked.
        Returns:
        Value of true if @link String} is null, is empty ("") or contains white spaces only or false otherwise