public class CommandLineOption extends Object
| Constructor and Description |
|---|
CommandLineOption(String shortOption,
String longOption,
boolean hasArg,
boolean required,
String description,
String name)
Construct one option
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
String |
getDescription() |
String |
getLongOption() |
String |
getName() |
String |
getShortOption() |
boolean |
isHasArg() |
boolean |
isRequired() |
void |
printUsage() |
void |
setDescription(String description) |
void |
setHasArg(boolean hasArg) |
void |
setLongOption(String longOption) |
void |
setName(String name) |
void |
setRequired(boolean required) |
void |
setShortOption(String shortOption) |
String |
toString() |
public CommandLineOption(String shortOption, String longOption, boolean hasArg, boolean required, String description, String name)
shortOption - is the character for single dasheslongOption - is the full text for double dasheshasArg - does it require an argument, or is it a flag?required - is it required?description - is the descriptive text to be used in the usagename - is the display name of the optionpublic String getName()
public void setName(String name)
name - the name to setpublic String getDescription()
public void setDescription(String description)
description - the description to setpublic String getLongOption()
public void setLongOption(String longOption)
longOption - the longOption to setpublic String getShortOption()
public void setShortOption(String shortOption)
shortOption - the shortOption to setpublic boolean isHasArg()
public void setHasArg(boolean hasArg)
hasArg - the hasArg to setpublic boolean isRequired()
public void setRequired(boolean required)
required - the required to setpublic boolean equals(Object obj)
equals in class ObjectObject.equals(java.lang.Object)public void printUsage()
Copyright © 2017. All rights reserved.