Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add optValue to CliOption
  • Loading branch information
A-Joshi authored and jimschubert committed Mar 25, 2019
commit 8b88ad3216c1978e324e1ade6bc6fc75f079883e
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public class CliOption {
private String description;
private String type;
private String defaultValue;
private String optValue;
private Map<String, String> enumValues;

public CliOption(String opt, String description) {
Expand Down Expand Up @@ -73,6 +74,15 @@ public CliOption defaultValue(String defaultValue) {
return this;
}

public String getOptValue() { return this.optValue;}
public void setOptValue(String optValue) {
if (this.enumValues!=null && this.enumValues.containsKey(optValue)) {
this.optValue = optValue;
} else {
this.optValue = null;
}
}

public CliOption addEnum(String value, String description) {
if (this.enumValues == null) {
this.enumValues = new LinkedHashMap<String, String>();
Expand Down