Skip to content

Commit

Permalink
string builder chars.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gray Watson committed Mar 27, 2015
1 parent e5943d0 commit d518d23
Showing 1 changed file with 5 additions and 5 deletions.
Expand Up @@ -76,19 +76,19 @@ private void doSampleDatabaseStuff(String action, TextView tv) {
List<SimpleData> list = simpleDao.queryForAll();
// our string builder for building the content-view
StringBuilder sb = new StringBuilder();
sb.append("got ").append(list.size()).append(" entries in ").append(action).append("\n");
sb.append("got ").append(list.size()).append(" entries in ").append(action).append('\n');

// if we already have items in the database
int simpleC = 0;
for (SimpleData simple : list) {
sb.append("------------------------------------------\n");
sb.append("[").append(simpleC).append("] = ").append(simple).append("\n");
sb.append('[').append(simpleC).append("] = ").append(simple).append('\n');
simpleC++;
}
sb.append("------------------------------------------\n");
for (SimpleData simple : list) {
simpleDao.delete(simple);
sb.append("deleted id ").append(simple.id).append("\n");
sb.append("deleted id ").append(simple.id).append('\n');
Log.i(LOG_TAG, "deleting simple(" + simple.id + ")");
simpleC++;
}
Expand All @@ -106,8 +106,8 @@ private void doSampleDatabaseStuff(String action, TextView tv) {
Log.i(LOG_TAG, "created simple(" + millis + ")");
// output it
sb.append("------------------------------------------\n");
sb.append("created new entry #").append(i + 1).append(":\n");
sb.append(simple).append("\n");
sb.append("created new entry #").append(i + 1).append('\n');
sb.append(simple).append('\n');
try {
Thread.sleep(5);
} catch (InterruptedException e) {
Expand Down

0 comments on commit d518d23

Please sign in to comment.