Add Javadoc comments to enhance code clarity
[cli-helper.git] / src / main / java / eu / svjatoslav / commons / cli_helper / parameter_parser / parameter / FileOptions.java
index 6c6e51c..9534224 100755 (executable)
@@ -13,6 +13,10 @@ import java.util.stream.Collectors;
 
 import static eu.svjatoslav.commons.cli_helper.parameter_parser.parameter.FileOption.validateFile;
 
+/**
+ * This class represents commandline option which accepts one or more parameters
+ * which are files.
+ */
 public class FileOptions extends Option<List<File>, FileOptions> {
 
     private ExistenceType existenceType = ExistenceType.DOES_NOT_MATTER;
@@ -38,11 +42,21 @@ public class FileOptions extends Option<List<File>, FileOptions> {
         return parameters.stream().map(File::new).collect(Collectors.toList());
     }
 
+    /**
+     * This method is used to define that file shall exist in filesystem.
+     *
+     * @return This object.
+     */
     public FileOptions mustExist() {
         existenceType = ExistenceType.MUST_EXIST;
         return this;
     }
 
+    /**
+     * This method is used to define that file shall not exist in filesystem.
+     *
+     * @return This object.
+     */
     public FileOptions mustNotExist() {
         existenceType = ExistenceType.MUST_NOT_EXIST;
         return this;