Class Strings

java.lang.Object
org.apache.camel.tooling.model.Strings

public final class Strings extends Object
Some String helper methods
  • Method Details

    • isNullOrEmpty

      public static boolean isNullOrEmpty(String text)
      Returns true if the given text is null or empty string or has null as the value
    • cutLastZeroDigit

      public static String cutLastZeroDigit(String version)
    • wrapCamelCaseWords

      public static String wrapCamelCaseWords(String option, int watermark, String lineSep)
      To wrap long camel cased texts by words.
      Parameters:
      option - the option which is camel cased.
      watermark - a watermark to denote the size to cut after
      lineSep - the new line to use when breaking into a new line
    • wrapWords

      public static String wrapWords(String line, String wordSep, String lineSep, int watermark, boolean wrapLongWords)
      To wrap a big line by words.
      Parameters:
      line - the big line
      wordSep - the word separator
      lineSep - the new line to use when breaking into a new line
      watermark - a watermark to denote the size to cut after
      wrapLongWords - whether to wrap long words
    • getClassShortName

      public static String getClassShortName(String className)
      Returns the base class name, i.e. without package and generic related information.
      Parameters:
      className - The class name which base class is to be computed.
      Returns:
      the base class name, i.e. without package and generic related information.