Package org.apache.camel.tooling.model
Class Strings
- java.lang.Object
-
- org.apache.camel.tooling.model.Strings
-
public final class Strings extends Object
Some String helper methods
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
cutLastZeroDigit(String version)
static String
getClassShortName(String className)
Returns the base class name, i.e.static boolean
isNullOrEmpty(String text)
Returns true if the given text is null or empty string or has null as the valuestatic String
wrapCamelCaseWords(String option, int watermark, String lineSep)
To wrap long camel cased texts by words.static String
wrapWords(String line, String wordSep, String lineSep, int watermark, boolean wrapLongWords)
To wrap a big line by words.
-
-
-
Method Detail
-
isNullOrEmpty
public static boolean isNullOrEmpty(String text)
Returns true if the given text is null or empty string or has null as the value
-
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 afterlineSep
- 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 linewordSep
- the word separatorlineSep
- the new line to use when breaking into a new linewatermark
- a watermark to denote the size to cut afterwrapLongWords
- 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.
-
-