public static convertStringSetToString(Set
StringBuilder sb = new StringBuilder();
if (inputStrSet != null) {
Iterator
while (iters.hasNext()) {
String stringValue = iters.next();
sb.append(stringValue);
sb.append(delimiter);
}
}
return sb.toString();
}
public String convertStringListToString(List
StringBuilder sb = new StringBuilder();
if (inputStrList != null) {
Iterator
while (iters.hasNext()) {
String stringValue = iters.next();
sb.append(stringValue);
sb.append(delimiter);
}
}
return sb.toString();
}
public
if (array != null) {
StringBuilder builder = new StringBuilder();
for (int i = 0; i < array.length; i++) {
Object object = (Object) array[i];
builder.append(String.valueOf(object));
if (i < array.length - 1) {
builder.append(", ");
}
}
return builder.toString();
} ///if null return ""?
}
No comments:
Post a Comment