Class Strings


  • public class Strings
    extends java.lang.Object
    Helper function for processing strings.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean isNullOrEmpty​(java.lang.String value)
      Tests if a string is null or empty
      static java.lang.String trimmed​(java.lang.String value)
      Returns string with leading and trailing whitespace removed
      static java.lang.String whiteSpaceRemoved​(java.lang.String value)
      Returns string without white space
      • Methods inherited from class java.lang.Object

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

      • trimmed

        public static java.lang.String trimmed​(java.lang.String value)
        Returns string with leading and trailing whitespace removed

        For empty strings or null, null is returned.

        Parameters:
        value - string to trim or null
        Returns:
        trimmed string
      • whiteSpaceRemoved

        public static java.lang.String whiteSpaceRemoved​(java.lang.String value)
        Returns string without white space
        Parameters:
        value - string to process (non null)
        Returns:
        resulting string with all whitespace removed
      • isNullOrEmpty

        public static boolean isNullOrEmpty​(java.lang.String value)
        Tests if a string is null or empty

        A string consisting of all whitespace is considered empty.

        Parameters:
        value - string to test
        Returns:
        boolean indicating if string is null or empty