Skip to content

Commit

Permalink
Improved the $-util
Browse files Browse the repository at this point in the history
  • Loading branch information
emilforslund committed Jan 20, 2015
1 parent 6ea2d0b commit 39fcbfa
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/main/java/com/speedment/util/$.java
Expand Up @@ -7,10 +7,10 @@
public class $ implements CharSequence {

private static final CharSequence[] EMPTY = new CharSequence[0];

private final StringBuilder str;

public $() {
private $() {
this(EMPTY);
}

Expand All @@ -19,9 +19,15 @@ public class $ implements CharSequence {
$(objects);
}

public final $ $(Object... objects) {
for (Object object : objects) {
str.append(object);
public final $ $(Object firstObject) {
str.append(firstObject);
return this;
}

public final $ $(Object firstObject, Object... theRest) {
$(firstObject);
for (Object object : theRest) {
$(object);
}
return this;
}
Expand Down

0 comments on commit 39fcbfa

Please sign in to comment.