33 lines
665 B
Java
33 lines
665 B
Java
package xyz.etztech.serverapi.web.api;
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
import java.util.stream.Collectors;
|
|
|
|
public class CustomAPI {
|
|
private final String command;
|
|
private final List<String> args;
|
|
|
|
public CustomAPI() {
|
|
this.command = "";
|
|
this.args = new ArrayList<>();
|
|
}
|
|
|
|
public CustomAPI(String command, List<String> args) {
|
|
this.command = command;
|
|
this.args = args;
|
|
}
|
|
|
|
public String getCommand() {
|
|
return command;
|
|
}
|
|
|
|
public List<String> getArgs() {
|
|
return args;
|
|
}
|
|
|
|
public String build() {
|
|
return command + " " + String.join(" ", args);
|
|
}
|
|
}
|