All checks were successful
Deploy to Dokku / docker (ubuntu-latest) (push) Successful in 2m2s
44 lines
1010 B
Java
44 lines
1010 B
Java
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();
|
|
}
|
|
}
|