[Git][java-team/maven-repo-helper][master] Documented the Argument class

Emmanuel Bourg gitlab at salsa.debian.org
Wed Aug 7 15:30:26 BST 2019



Emmanuel Bourg pushed to branch master at Debian Java Maintainers / maven-repo-helper


Commits:
6ed2858a by Emmanuel Bourg at 2019-08-07T14:29:20Z
Documented the Argument class

- - - - -


2 changed files:

- src/main/java/org/debian/maven/cliargs/Argument.java
- src/main/java/org/debian/maven/cliargs/ArgumentsMap.java


Changes:

=====================================
src/main/java/org/debian/maven/cliargs/Argument.java
=====================================
@@ -1,10 +1,29 @@
 package org.debian.maven.cliargs;
 
+/**
+ * Command line argument, either an option or a parameter.
+ */
 public class Argument {
+    /** The name of the option, or null for a parameter */
     public final String name;
+
+    /** */
     public final String value;
+
+    /** The type of the argument (short option, long option or a parameter) */
     public final Type type;
 
+    public enum Type {
+        /** Long option (i.e. --foo) */
+        LONG,
+        
+        /** Short option (i.e. -f) */
+        SHORT,
+        
+        /** Parameter */
+        ARG
+    }
+    
     Argument(final String arg) {
         final String trimmed = arg.trim();
 
@@ -28,8 +47,4 @@ public class Argument {
             value = trimmed;
         }
     }
-
-    public static enum Type {
-        LONG, SHORT, ARG
-    }
 }


=====================================
src/main/java/org/debian/maven/cliargs/ArgumentsMap.java
=====================================
@@ -15,8 +15,8 @@ public class ArgumentsMap {
     private final Map<String, List<String>> shortMap = new HashMap<String, List<String>>();
     private final List<String> args = new ArrayList<String>();
 
-    public ArgumentsMap(final ArgumentsIterable it) {
-        for (Argument argument : it) {
+    public ArgumentsMap(final ArgumentsIterable arguments) {
+        for (Argument argument : arguments) {
             switch (argument.type) {
                 case LONG:
                     addToMap(longMap, argument.name, argument.value);



View it on GitLab: https://salsa.debian.org/java-team/maven-repo-helper/commit/6ed2858a80ede5957323f979486759f28a5290b0

-- 
View it on GitLab: https://salsa.debian.org/java-team/maven-repo-helper/commit/6ed2858a80ede5957323f979486759f28a5290b0
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20190807/a5747d9b/attachment.html>


More information about the pkg-java-commits mailing list