You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by br...@apache.org on 2017/06/08 17:36:46 UTC

[17/50] [abbrv] commons-cli git commit: JavaDoc tweaks

JavaDoc tweaks

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/cli/trunk@1754331 13f79535-47bb-0310-9956-ffa450edef68


Project: http://git-wip-us.apache.org/repos/asf/commons-cli/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-cli/commit/7d5129c7
Tree: http://git-wip-us.apache.org/repos/asf/commons-cli/tree/7d5129c7
Diff: http://git-wip-us.apache.org/repos/asf/commons-cli/diff/7d5129c7

Branch: refs/heads/master
Commit: 7d5129c756ee4de5e7ad7f1c3de81a99368c97b1
Parents: 5d1d967
Author: Benedikt Ritter <br...@apache.org>
Authored: Wed Jul 27 18:47:24 2016 +0000
Committer: Benedikt Ritter <br...@apache.org>
Committed: Wed Jul 27 18:47:24 2016 +0000

----------------------------------------------------------------------
 .../java/org/apache/commons/cli/Options.java    | 31 ++++++++++++++++----
 1 file changed, 26 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-cli/blob/7d5129c7/src/main/java/org/apache/commons/cli/Options.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/cli/Options.java b/src/main/java/org/apache/commons/cli/Options.java
index 1a10153..5b2410f 100644
--- a/src/main/java/org/apache/commons/cli/Options.java
+++ b/src/main/java/org/apache/commons/cli/Options.java
@@ -98,7 +98,10 @@ public class Options implements Serializable
 
     /**
      * Add an option that only contains a short name.
+     * 
+     * <p>
      * The option does not take an argument.
+     * </p>
      *
      * @param opt Short single-character name of the option.
      * @param description Self-documenting description
@@ -113,7 +116,10 @@ public class Options implements Serializable
 
     /**
      * Add an option that only contains a short-name.
+     *
+     * <p>
      * It may be specified as requiring an argument.
+     * </p>
      *
      * @param opt Short single-character name of the option.
      * @param hasArg flag signally if an argument is required after this option
@@ -128,7 +134,10 @@ public class Options implements Serializable
 
     /**
      * Add an option that contains a short-name and a long-name.
+     *
+     * <p>
      * It may be specified as requiring an argument.
+     * </p>
      *
      * @param opt Short single-character name of the option.
      * @param longOpt Long multi-character name of the option.
@@ -144,8 +153,18 @@ public class Options implements Serializable
 
     /**
      * Add an option that contains a short-name and a long-name.
-     * This option is set as required.
-     * It may be specified as requiring an argument.
+     * 
+     * <p>
+     * The added option is set as required. It may be specified as requiring an argument. This method is a shortcut for:
+     * </p>
+     *
+     * <pre>
+     * <code>
+     * Options option = new Option(opt, longOpt, hasArg, description);
+     * option.setRequired(true);
+     * options.add(option);
+     * </code>
+     * </pre>
      *
      * @param opt Short single-character name of the option.
      * @param longOpt Long multi-character name of the option.
@@ -224,7 +243,10 @@ public class Options implements Serializable
 
     /**
      * Retrieve the {@link Option} matching the long or short name specified.
+     *
+     * <p>
      * The leading hyphens in the name are ignored (up to 2).
+     * </p>
      *
      * @param opt short or long name of the {@link Option}
      * @return the option represented by opt
@@ -314,10 +336,9 @@ public class Options implements Serializable
 
     /**
      * Returns the OptionGroup the <code>opt</code> belongs to.
-     * @param opt the option whose OptionGroup is being queried.
      *
-     * @return the OptionGroup if <code>opt</code> is part
-     * of an OptionGroup, otherwise return null
+     * @param opt the option whose OptionGroup is being queried.
+     * @return the OptionGroup if <code>opt</code> is part of an OptionGroup, otherwise return null
      */
     public OptionGroup getOptionGroup(Option opt)
     {