Skip to content

Commit

Permalink
simplify .toString()
Browse files Browse the repository at this point in the history
  • Loading branch information
maxim5 committed Jul 12, 2021
1 parent d790143 commit 2ba3d69
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/io/routekit/ConstToken.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public CharBuffer buffer() {

@Override
public String toString() {
return "ConstToken[" + token + "]";
return "ConstToken[%s]".formatted(token);
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion src/io/routekit/SeparableVariableToken.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ public int match(CharBuffer buffer) {

@Override
public String toString() {
return "SeparableVariableToken[" + name() + "]";
return "SeparableVariableToken[%s]".formatted(name());
}
}
2 changes: 1 addition & 1 deletion src/io/routekit/WildcardToken.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ public int match(CharBuffer buffer) {

@Override
public String toString() {
return "WildcardToken[" + name() + "]";
return "WildcardToken[%s]".formatted(name());
}
}

0 comments on commit 2ba3d69

Please sign in to comment.