0

First Commit

This commit is contained in:
BuildTools
2016-08-06 12:00:33 +02:00
parent e63adbdb82
commit 24ec6d2a32
21 changed files with 1185 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
package com.nemez.cmdmgr.component;
public class ShortComponent extends ArgumentComponent {
@Override
public Object get(String input) {
try {
return Short.parseShort(input);
} catch (NumberFormatException e) {
return null;
}
}
@Override
public boolean valid(String input) {
try {
Short.parseShort(input);
return true;
} catch (NumberFormatException e) {
return false;
}
}
@Override
public String getComponentInfo() {
return "<" + argName + ":i16>";
}
}