/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9.0b1)
- * Copyright (C) 2015 The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
*
* This file is part of Jalview.
*
public class Option implements OptionI
{
+ String name;
- String name, value, defvalue, description;
+ /*
+ * current value in string format, or "null" if undefined
+ */
+ String value;
- ArrayList<String> possibleVals = new ArrayList<String>();
+ /*
+ * default value in string format, or "null" if undefined
+ */
+ String defvalue;
+
+ String description;
+
+ ArrayList<String> possibleVals = new ArrayList<>();
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<String>();
+ this.possibleVals = new ArrayList<>();
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;
+ }
}