finish moderation
All checks were successful
Deploy to Dokku / docker (ubuntu-latest) (push) Successful in 2m2s
All checks were successful
Deploy to Dokku / docker (ubuntu-latest) (push) Successful in 2m2s
This commit is contained in:
@ -0,0 +1,43 @@
|
||||
package cc.fascinated.bat.common;
|
||||
|
||||
import lombok.NonNull;
|
||||
|
||||
/**
|
||||
* @author Fascinated (fascinated7)
|
||||
*/
|
||||
public class DescriptionBuilder {
|
||||
/**
|
||||
* Where the description is stored
|
||||
*/
|
||||
private final StringBuilder builder = new StringBuilder();
|
||||
|
||||
public DescriptionBuilder(String title) {
|
||||
if (title == null) {
|
||||
return;
|
||||
}
|
||||
builder.append("**").append(title).append("**").append("\n");
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public DescriptionBuilder appendLine(@NonNull String line, boolean arrow) {
|
||||
builder.append(arrow ? "➜ " : "").append(line).append("\n");
|
||||
return this;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public DescriptionBuilder appendSubtitle(@NonNull String title) {
|
||||
builder.append("**").append(title).append("**").append("\n");
|
||||
return this;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public DescriptionBuilder emptyLine() {
|
||||
builder.append("\n");
|
||||
return this;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public String build() {
|
||||
return builder.toString();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user