org.clazzes.jdbc2xml.helper
Class JAVAHelper

java.lang.Object
  extended by org.clazzes.jdbc2xml.helper.JAVAHelper

public abstract class JAVAHelper
extends java.lang.Object

Commonf helper functions, which are not part of JAVA.

Author:
wglas

Constructor Summary
JAVAHelper()
           
 
Method Summary
static java.lang.String joinStrings(java.util.Collection<java.lang.String> strings)
          Simply concatenate a collection of strings by using a comma as separator.
static void joinStrings(java.lang.StringBuffer sb, java.util.Collection<java.lang.String> strings)
          Simply concatenate a collection of strings by using a comma as separator.
static java.util.List<java.lang.String> splitString(java.lang.String s)
          Split a string at all occurrences of the comma char.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JAVAHelper

public JAVAHelper()
Method Detail

joinStrings

public static void joinStrings(java.lang.StringBuffer sb,
                               java.util.Collection<java.lang.String> strings)
Simply concatenate a collection of strings by using a comma as separator. No quoting is undertaken, as this function is usually used for SQL column names.

Parameters:
sb - The string buffer to write the concatenated list of string to.
strings - A collection of strings.

joinStrings

public static java.lang.String joinStrings(java.util.Collection<java.lang.String> strings)
Simply concatenate a collection of strings by using a comma as separator. No quoting is undertaken, as this function is usually used for SQL column names.

Parameters:
strings - A collection of strings.
Returns:
A string containing all strings delimited by a comma.

splitString

public static java.util.List<java.lang.String> splitString(java.lang.String s)
Split a string at all occurrences of the comma char.

Parameters:
s - The string to split.
Returns:
A list of strings.


Copyright © 2008. All Rights Reserved.