DBVIEW
org.dbview.utils.Strings Class Reference

List of all members.

Static Public Member Functions

static String joinWithNewLines (List< String > in_list)
static String join (List< String > in_list, String in_separator)
static String indent (String in_prefix, String in_text)
static int longest (ArrayList< String > in_list)
static String paddingRight (String in_string, int in_length, Character in_padding)
static void paddingRight (ArrayList< String > in_list, int in_length)
static void paddingRight (ArrayList< String > in_list, int in_length, Character in_padding)
static void margingRight (ArrayList< String > in_list, int in_gap)
static ArrayList< String > stringToArrayList (String in_source)
static String arrayListToString (ArrayList< String > in_array)
static String dashToLowerCamelCase (String in_source)
static String dashToUpperCamelCase (String in_source)
static String lowerCamelCaseToDash (String in_source)
static String upperCamelCaseToDash (String in_source)
static String firstToUppercase (String in_string)
static String firstTolowercase (String in_string)
static Boolean isEmpty (String in_string)
static String SHAsum (byte[] in_convertme)
static String SHAsum (String in_convertme)

Static Private Member Functions

static String byteArray2Hex (final byte[] in_hash)

Static Private Attributes

static String __newLine = System.getProperty("line.separator")

Detailed Description

This class contains tools used to manipulate strings.

Author:
Denis Beurive

Definition at line 38 of file Strings.java.


Member Function Documentation

static String org.dbview.utils.Strings.arrayListToString ( ArrayList< String >  in_array) [static]

This method returns a string that is the concatenation of an array list of strings.

Parameters:
in_arrayArray list of strings to convert.
Returns:
The method returns the string that represents the concatenation of the given array.

Definition at line 189 of file Strings.java.

Referenced by org.dbview.utils.Strings.dashToLowerCamelCase(), and org.dbview.utils.Strings.lowerCamelCaseToDash().

static String org.dbview.utils.Strings.byteArray2Hex ( final byte[]  in_hash) [static, private]

Convert an array of bytes into a string that represents a hexadecimal value.

Parameters:
in_hashArray of bytes.
Returns:
The method returns a string of hexadecimal characters that represents the given array of bytes.

Definition at line 309 of file Strings.java.

Referenced by org.dbview.utils.Strings.SHAsum().

static String org.dbview.utils.Strings.dashToLowerCamelCase ( String  in_source) [static]

This method converts a string that contains dashes into "Lower Camel Case". Example: "a-bc-de" becomes "aBcDe".

Parameters:
in_sourceString to convert.
Returns:
The method converts the given string into lower Camel case.

Definition at line 202 of file Strings.java.

Referenced by org.dbview.utils.Strings.dashToUpperCamelCase().

static String org.dbview.utils.Strings.dashToUpperCamelCase ( String  in_source) [static]

This method converts a string that contains dashes into "Upper Camel Case". Example: "a-bc-de" becomes "ABcDe".

Parameters:
in_sourceString to convert.
Returns:
The method converts the given string into upper Camel case.

Definition at line 224 of file Strings.java.

static String org.dbview.utils.Strings.firstTolowercase ( String  in_string) [static]

This method converts the first character of a given string into lower case.

Parameters:
in_stringString to convert.
Returns:
The method returns the converted string.

Definition at line 284 of file Strings.java.

Referenced by org.dbview.utils.Strings.upperCamelCaseToDash().

static String org.dbview.utils.Strings.firstToUppercase ( String  in_string) [static]

This method converts the first character of a given string into upper case.

Parameters:
in_stringString to convert.
Returns:
The method returns the converted string.

Definition at line 272 of file Strings.java.

Referenced by org.dbview.utils.Strings.dashToUpperCamelCase().

static String org.dbview.utils.Strings.indent ( String  in_prefix,
String  in_text 
) [static]

This method adds a given prefix at the beginning of all lines in a given text.

Parameters:
in_prefixString to add at the beginning of all lines.
in_textText to indent.
Returns:
The method returns the indented text.

Definition at line 88 of file Strings.java.

Referenced by org.dbview.db.structure.Database.toString().

static Boolean org.dbview.utils.Strings.isEmpty ( String  in_string) [static]

Test if a string is empty or null.

Parameters:
in_stringString to test.
Returns:
The method returns TRUE if the string is empty or null. Otherwise, it returns FALSE.

Definition at line 297 of file Strings.java.

static String org.dbview.utils.Strings.join ( List< String >  in_list,
String  in_separator 
) [static]

This method joins all elements of a given list using a given separator.

Parameters:
in_listList to join.
in_separatorSeparator to use.
Returns:
The method returns a string.

Definition at line 69 of file Strings.java.

static String org.dbview.utils.Strings.joinWithNewLines ( List< String >  in_list) [static]

This method joins all elements of a given list using new lines as separator.

Parameters:
in_listList to join.
Returns:
The method returns a string.

Definition at line 50 of file Strings.java.

Referenced by org.dbview.utils.Strings.indent(), org.dbview.db.structure.Table.toString(), and org.dbview.db.structure.Database.toString().

static int org.dbview.utils.Strings.longest ( ArrayList< String >  in_list) [static]

This method returns the size of the longest string in a list of strings.

Parameters:
in_listList of strings.
Returns:
The method returns the size of the longest string in a list of strings.

Definition at line 101 of file Strings.java.

Referenced by org.dbview.utils.Strings.margingRight().

static String org.dbview.utils.Strings.lowerCamelCaseToDash ( String  in_source) [static]

This method returns the dashed representation of a given "Lower Camel Case" string. Example: "aBcDe" -> "a-bc-de"

Parameters:
in_source"Lower Camel Case" to convert.
Returns:
The method returns the dashed representation of the given "Lower Camel Case" string.

Definition at line 235 of file Strings.java.

Referenced by org.dbview.utils.Strings.upperCamelCaseToDash().

static void org.dbview.utils.Strings.margingRight ( ArrayList< String >  in_list,
int  in_gap 
) [static]

This method adds spaces to the end of all elements of a given array of strings. At the end of the operation, all elements of the array have the same length. The length of all elements is equal to the length of the largest element plus a given gap.

Parameters:
in_listArray of elements.
in_gapSize of the gap.

Definition at line 166 of file Strings.java.

Referenced by org.dbview.runtime.actions.Actions.showProfile().

static String org.dbview.utils.Strings.paddingRight ( String  in_string,
int  in_length,
Character  in_padding 
) [static]

This method adds a given padding to the end of a given string.

Parameters:
in_stringThe string that will be padded.
in_lengthLength of the string at the end of the operation.
in_paddingPadding to add.
Returns:
The method returns the padded string.

Definition at line 115 of file Strings.java.

Referenced by org.dbview.utils.Strings.margingRight().

static void org.dbview.utils.Strings.paddingRight ( ArrayList< String >  in_list,
int  in_length 
) [static]

This method adds spaces to the end of all elements of a given array.

Parameters:
in_listArray of elements.
in_lengthMinimum length for all elements, at the end of the operation.

Definition at line 129 of file Strings.java.

static void org.dbview.utils.Strings.paddingRight ( ArrayList< String >  in_list,
int  in_length,
Character  in_padding 
) [static]

This method adds a given padding to the end of all elements of a given array.

Parameters:
in_listArray of elements.
in_lengthMinimum length for all elements, at the end of the operation.
in_paddingPadding to add.

Definition at line 147 of file Strings.java.

static String org.dbview.utils.Strings.SHAsum ( byte[]  in_convertme) [static]

Compute the SHA of a given array of bytes. The returned value is a string of hexadecimal characters.

Parameters:
in_convertmeArray of bytes to process.
Returns:
The method returns a string that represents the SHA of the given array of bytes.
Note:
We ignore exception "NoSuchAlgorithmException" (since the Algorithm "SHA-1" exists)

Definition at line 323 of file Strings.java.

Referenced by org.dbview.utils.dot.Node.generateName(), org.dbview.utils.dot.SubGraph.generateName(), and org.dbview.utils.Strings.SHAsum().

static String org.dbview.utils.Strings.SHAsum ( String  in_convertme) [static]

Compute the SHA of a given string. The returned value is a string of hexadecimal characters.

Parameters:
in_convertmeString to process.
Returns:
The method returns a string that represents the SHA of the given string.

Definition at line 339 of file Strings.java.

static ArrayList<String> org.dbview.utils.Strings.stringToArrayList ( String  in_source) [static]

This method converts a string into an array list of strings.

Parameters:
in_sourceString to convert.
Returns:
The method returns the array list of strings.

Definition at line 177 of file Strings.java.

Referenced by org.dbview.utils.Strings.dashToLowerCamelCase(), and org.dbview.utils.Strings.lowerCamelCaseToDash().

static String org.dbview.utils.Strings.upperCamelCaseToDash ( String  in_source) [static]

This method returns the dashed representation of a given "Upper Camel Case" string. Example: "ABcDe" -> "a-bc-de"

Parameters:
in_source"Lower Camel Case" to convert.
Returns:
The method returns the dashed representation of the given "Upper Camel Case" string.

Definition at line 262 of file Strings.java.


Member Data Documentation

String org.dbview.utils.Strings.__newLine = System.getProperty("line.separator") [static, private]

New line separator.

Definition at line 43 of file Strings.java.

Referenced by org.dbview.utils.Strings.indent(), and org.dbview.utils.Strings.joinWithNewLines().


The documentation for this class was generated from the following file: