Initial commit
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
package net.locusworks.argparser.converters;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import net.locusworks.argparser.interfaces.IParameterConverter;
|
||||
|
||||
public class FileConverter implements IParameterConverter<File> {
|
||||
|
||||
public File convert(String value) {
|
||||
File file = new File(value);
|
||||
return file;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package net.locusworks.argparser.converters;
|
||||
|
||||
import net.locusworks.argparser.interfaces.IParameterConverter;
|
||||
|
||||
public class IntegerConverter implements IParameterConverter<Integer> {
|
||||
|
||||
@Override
|
||||
public Integer convert(String value) {
|
||||
return Integer.parseInt(value);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package net.locusworks.argparser.converters;
|
||||
|
||||
import net.locusworks.argparser.interfaces.IParameterConverter;
|
||||
|
||||
public class NoConverter implements IParameterConverter<String> {
|
||||
|
||||
public String convert(String value) {
|
||||
return value;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user