/*
* Svjatoslav Commons - shared library of common functionality.
- * Copyright ©2012-2014, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
+ * Copyright ©2012-2017, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 3 of the GNU Lesser General Public License
import java.io.File;
-public class FileParameter extends Parameter<FileParameter> {
+public class FileParameter extends Parameter<File, FileParameter> {
private ExistenceType existenceType = ExistenceType.DOES_NOT_MATTER;
@Override
public boolean validate(final java.lang.String value) {
+ return validateFile(existenceType, value);
+ }
+
+ protected static boolean validateFile(ExistenceType existenceType, String value) {
final File file = new File(value);
if (existenceType == ExistenceType.MUST_EXIST) {