public class Option implements OptionI
{
- String name;
- /*
- * current value in string format, or "null" if undefined
- */
- String value;
+ String name, value, defvalue, description;
- /*
- * default value in string format, or "null" if undefined
- */
- String defvalue;
-
- String description;
-
- ArrayList<String> possibleVals = new ArrayList<>();
+ ArrayList<String> possibleVals = new ArrayList<String>();
boolean required;
{
name = new String(opt.name);
if (opt.value != null)
- {
value = new String(opt.value);
- }
if (opt.defvalue != null)
- {
defvalue = new String(opt.defvalue);
- }
if (opt.description != null)
- {
description = new String(opt.description);
- }
if (opt.possibleVals != null)
{
possibleVals = (ArrayList<String>) opt.possibleVals.clone();
this.defvalue = defValue;
if (possibleVals != null)
{
- this.possibleVals = new ArrayList<>();
+ this.possibleVals = new ArrayList<String>();
this.possibleVals.addAll(possibleVals);
}
this.fdetails = fdetails;
Option opt = new Option(this);
return opt;
}
-
- /**
- * toString method to help identify options in the debugger only
- */
- @Override
- public String toString()
- {
- return this.getClass().getName() + ":" + name;
- }
}