commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From roxspr...@apache.org
Subject cvs commit: jakarta-commons/cli/src/java/org/apache/commons/cli2/builder PatternBuilder.java DefaultOptionBuilder.java CommandBuilder.java GroupBuilder.java ArgumentBuilder.java SwitchBuilder.java
Date Fri, 08 Oct 2004 16:35:34 GMT
roxspring    2004/10/08 09:35:34

  Modified:    cli/src/java/org/apache/commons/cli2/builder
                        PatternBuilder.java DefaultOptionBuilder.java
                        CommandBuilder.java GroupBuilder.java
                        ArgumentBuilder.java SwitchBuilder.java
  Log:
  *Builder.reset() now returns this builder instance
  
  Revision  Changes    Path
  1.3       +2 -1      jakarta-commons/cli/src/java/org/apache/commons/cli2/builder/PatternBuilder.java
  
  Index: PatternBuilder.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/cli/src/java/org/apache/commons/cli2/builder/PatternBuilder.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- PatternBuilder.java	22 Apr 2004 23:00:15 -0000	1.2
  +++ PatternBuilder.java	8 Oct 2004 16:35:34 -0000	1.3
  @@ -91,8 +91,9 @@
       /**
        * Resets this builder
        */
  -    public void reset() {
  +    public PatternBuilder reset() {
           options.clear();
  +        return this;
       }
   
       private void createOption(
  
  
  
  1.4       +2 -1      jakarta-commons/cli/src/java/org/apache/commons/cli2/builder/DefaultOptionBuilder.java
  
  Index: DefaultOptionBuilder.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/cli/src/java/org/apache/commons/cli2/builder/DefaultOptionBuilder.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DefaultOptionBuilder.java	7 Sep 2004 00:18:24 -0000	1.3
  +++ DefaultOptionBuilder.java	8 Oct 2004 16:35:34 -0000	1.4
  @@ -116,7 +116,7 @@
       /**
        * Resets the builder
        */
  -    public void reset() {
  +    public DefaultOptionBuilder reset() {
           preferredName = null;
           description = null;
           aliases = new HashSet();
  @@ -125,6 +125,7 @@
           argument = null;
           children = null;
           id = 0;
  +        return this;
       }
   
       /**
  
  
  
  1.3       +2 -1      jakarta-commons/cli/src/java/org/apache/commons/cli2/builder/CommandBuilder.java
  
  Index: CommandBuilder.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/cli/src/java/org/apache/commons/cli2/builder/CommandBuilder.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- CommandBuilder.java	22 Apr 2004 23:00:15 -0000	1.2
  +++ CommandBuilder.java	8 Oct 2004 16:35:34 -0000	1.3
  @@ -76,7 +76,7 @@
        * Resets the CommandBuilder to the defaults for a new Command. The method
        * should be called automatically at the end of a create() call.
        */
  -    public void reset() {
  +    public CommandBuilder reset() {
           preferredName = null;
           description = null;
           aliases = new HashSet();
  @@ -84,6 +84,7 @@
           argument = null;
           children = null;
           id = 0;
  +        return this;
       }
   
       /**
  
  
  
  1.3       +2 -1      jakarta-commons/cli/src/java/org/apache/commons/cli2/builder/GroupBuilder.java
  
  Index: GroupBuilder.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/cli/src/java/org/apache/commons/cli2/builder/GroupBuilder.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- GroupBuilder.java	22 Apr 2004 23:00:15 -0000	1.2
  +++ GroupBuilder.java	8 Oct 2004 16:35:34 -0000	1.3
  @@ -56,12 +56,13 @@
       /**
        * Resets the builder
        */
  -    public void reset() {
  +    public GroupBuilder reset() {
           name = null;
           description = null;
           options = new ArrayList();
           minimum = 0;
           maximum = Integer.MAX_VALUE;
  +        return this;
       }
   
       /**
  
  
  
  1.4       +2 -1      jakarta-commons/cli/src/java/org/apache/commons/cli2/builder/ArgumentBuilder.java
  
  Index: ArgumentBuilder.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/cli/src/java/org/apache/commons/cli2/builder/ArgumentBuilder.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ArgumentBuilder.java	2 Oct 2004 11:35:34 -0000	1.3
  +++ ArgumentBuilder.java	8 Oct 2004 16:35:34 -0000	1.4
  @@ -93,7 +93,7 @@
        * Resets the ArgumentBuilder to the defaults for a new Argument. The
        * method should be called automatically at the end of a create() call.
        */
  -    public final void reset() {
  +    public final ArgumentBuilder reset() {
           name = "arg";
           description = null;
           minimum = 0;
  @@ -104,6 +104,7 @@
           consumeRemaining = "--";
           defaultValues = null;
           id = 0;
  +        return this;
       }
   
       /**
  
  
  
  1.5       +2 -1      jakarta-commons/cli/src/java/org/apache/commons/cli2/builder/SwitchBuilder.java
  
  Index: SwitchBuilder.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/cli/src/java/org/apache/commons/cli2/builder/SwitchBuilder.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- SwitchBuilder.java	7 Sep 2004 00:18:24 -0000	1.4
  +++ SwitchBuilder.java	8 Oct 2004 16:35:34 -0000	1.5
  @@ -98,7 +98,7 @@
       /**
        * Resets the builder
        */
  -    public void reset() {
  +    public SwitchBuilder reset() {
           description = null;
           preferredName = null;
           required = false;
  @@ -107,6 +107,7 @@
           children = null;
           id = 0;
           switchDefault = null;
  +        return this;
       }
   
       /**
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message