Package org.apache.camel.tooling.model
Class Strings
java.lang.Object
org.apache.camel.tooling.model.Strings
Some String helper methods
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringcutLastZeroDigit(String version) static StringgetClassShortName(String className) Returns the base class name, i.e.static booleanisNullOrEmpty(String text) Returns true if the given text is null or empty string or has null as the valuestatic StringwrapCamelCaseWords(String option, int watermark, String lineSep) To wrap long camel cased texts by words.static StringTo wrap a big line by words.
-
Method Details
-
isNullOrEmpty
Returns true if the given text is null or empty string or has null as the value -
cutLastZeroDigit
-
wrapCamelCaseWords
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
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.
-