Class StringUtils


  • public class StringUtils
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      StringUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String max​(java.util.List<java.lang.String> strings)
      Returns the max String in the strings list.
      static java.lang.String min​(java.util.List<java.lang.String> strings)
      Returns the min String in the strings list.
      static Range<java.lang.String> range​(java.util.List<java.lang.String> strings)
      Returns the range of numbers.
      static java.lang.String stringList​(java.lang.Object[] objects)  
      static java.lang.String stringList​(java.lang.String prefix, java.lang.String suffix, java.lang.String separator, java.lang.Object... objects)
      Constructs a list of items in a string form using a prefix and suffix to denote the start and end of the list and a separator string in between the items.
      static java.lang.String stringList​(java.util.List<?> objects)  
      static java.lang.String toCamelCase​(java.lang.String str)
      Converts the supplied string to CamelCase by converting the first character to upper case and the rest of the string to lower case.
      • Methods inherited from class java.lang.Object

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

      • StringUtils

        public StringUtils()
    • Method Detail

      • toCamelCase

        public static java.lang.String toCamelCase​(java.lang.String str)
        Converts the supplied string to CamelCase by converting the first character to upper case and the rest of the string to lower case.
        Parameters:
        str - the input string
        Returns:
        a string
      • stringList

        public static java.lang.String stringList​(java.lang.String prefix,
                                                  java.lang.String suffix,
                                                  java.lang.String separator,
                                                  java.lang.Object... objects)
        Constructs a list of items in a string form using a prefix and suffix to denote the start and end of the list and a separator string in between the items. For example, with a prefix of '(', a suffix of ')', a separator of ',' and a list ["a", "b", "c"] it would generate the string "(a,b,c)"
        Parameters:
        prefix - the prefix for the concatenated string.
        suffix - the suffix for the concatenated string.
        separator - the separator between the elements.
        objects - the array of the elements.
        Returns:
        a concatenated string of the elements in the array.
      • stringList

        public static java.lang.String stringList​(java.lang.Object[] objects)
      • stringList

        public static java.lang.String stringList​(java.util.List<?> objects)
      • min

        public static java.lang.String min​(java.util.List<java.lang.String> strings)
        Returns the min String in the strings list.
        Parameters:
        strings - the numbers to calculate the min.
        Returns:
        the min String in the strings list.
      • max

        public static java.lang.String max​(java.util.List<java.lang.String> strings)
        Returns the max String in the strings list.
        Parameters:
        strings - the numbers to calculate the max.
        Returns:
        the max String in the strings list.
      • range

        public static Range<java.lang.String> range​(java.util.List<java.lang.String> strings)
        Returns the range of numbers.
        Parameters:
        strings - the numbers to calculate the range.
        Returns:
        the range of the numbers.