initial commit
This commit is contained in:
parent
3c9ee26b06
commit
22186c33b9
1458 changed files with 282792 additions and 0 deletions
47
java/src/game/command/Parameter.java
Normal file
47
java/src/game/command/Parameter.java
Normal file
|
@ -0,0 +1,47 @@
|
|||
package game.command;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class Parameter {
|
||||
private final String name;
|
||||
private final char shortName;
|
||||
private final boolean required;
|
||||
private final int position;
|
||||
private final List<ArgumentParser> parsers;
|
||||
|
||||
public Parameter(String name, char shortName, int position, boolean required, List<ArgumentParser> parsers) {
|
||||
this.name = name;
|
||||
this.shortName = shortName;
|
||||
this.position = position;
|
||||
this.required = required;
|
||||
this.parsers = parsers;
|
||||
}
|
||||
|
||||
public boolean isPositional() {
|
||||
return this.position > 0;
|
||||
}
|
||||
|
||||
public int getPosition() {
|
||||
return this.position;
|
||||
}
|
||||
|
||||
public List<ArgumentParser> getParsers() {
|
||||
return this.parsers;
|
||||
}
|
||||
|
||||
public boolean isRequired() {
|
||||
return this.required;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public boolean hasShortName() {
|
||||
return this.shortName != 0;
|
||||
}
|
||||
|
||||
public char getShortName() {
|
||||
return this.shortName;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue