Skip to content

Commit

Permalink
#441: added missing builder API and equals/hashcode checks
Browse files Browse the repository at this point in the history
  • Loading branch information
bbottema authored and remkop committed Aug 25, 2018
1 parent 72b0d5c commit 4c040de
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/main/java/picocli/CommandLine.java
Original file line number Diff line number Diff line change
Expand Up @@ -4367,6 +4367,7 @@ protected boolean equalsImpl(ArgSpec other) {
&& Assert.equals(this.arity, other.arity)
&& Assert.equals(this.hidden, other.hidden)
&& Assert.equals(this.paramLabel, other.paramLabel)
&& Assert.equals(this.hideParamSyntax, other.hideParamSyntax)
&& Assert.equals(this.required, other.required)
&& Assert.equals(this.splitRegex, other.splitRegex)
&& Arrays.equals(this.description, other.description)
Expand All @@ -4381,6 +4382,7 @@ protected int hashCodeImpl() {
+ 37 * Assert.hashCode(arity)
+ 37 * Assert.hashCode(hidden)
+ 37 * Assert.hashCode(paramLabel)
+ 37 * Assert.hashCode(hideParamSyntax)
+ 37 * Assert.hashCode(required)
+ 37 * Assert.hashCode(splitRegex)
+ 37 * Arrays.hashCode(description)
Expand Down Expand Up @@ -4446,10 +4448,14 @@ abstract static class Builder<T extends Builder<T>> {
/** Returns how many arguments this option or positional parameter requires.
* @see Option#arity() */
public Range arity() { return arity; }

/** Returns the name of the option or positional parameter used in the usage help message.
* @see Option#paramLabel() {@link Parameters#paramLabel()} */
public String paramLabel() { return paramLabel; }

/** Indicates whether paramLabel should be processed the regular way or that it should be rendered as-is.
* @see #paramLabel() {@link #paramLabel()} */
public boolean hideParamSyntax() { return hideParamSyntax; }

/** Returns auxiliary type information used when the {@link #type()} is a generic {@code Collection}, {@code Map} or an abstract class.
* @see Option#type() */
Expand Down

0 comments on commit 4c040de

Please sign in to comment.