Skip to content

Instantly share code, notes, and snippets.

@ykarikos
Created August 29, 2012 12:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ykarikos/3511914 to your computer and use it in GitHub Desktop.
Save ykarikos/3511914 to your computer and use it in GitHub Desktop.
Imperative Java Shit
private String getCustomerKeys(List<Customer> customers) {
StringBuilder keys = new StringBuilder();
if (customers != null) {
for (Customer customer: customers) {
if (keys.length() > 0) {
keys.append(", ");
}
keys.append(customer.customerKey.toString());
}
return keys.toString();
}
return null;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment