1 package jalview.bin.argparser;
4 * A helper class to keep an index of argument position with argument values
6 public class ArgValue implements Comparable<ArgValue>
14 // This id is set by a subVal id= to identify the product of this ArgValue
15 // later. Set but not currently used.
18 private SubVals subVals;
20 protected ArgValue(Arg a, SubVals sv, String content, int argIndex)
24 this.argIndex = argIndex;
25 this.subVals = sv == null ? new SubVals("") : sv;
28 protected ArgValue(Arg a, String value, int argIndex)
31 this.argIndex = argIndex;
32 this.subVals = new SubVals(value);
33 this.value = getSubVals().getContent();
41 public String getValue()
46 public int getArgIndex()
51 protected void setId(String i)
61 public SubVals getSubVals()
66 public String getSubVal(String key)
68 if (subVals == null || !subVals.has(key))
70 return subVals.get(key);
73 protected void putSubVal(String key, String val)
75 this.subVals.put(key, val);
79 public int compareTo(ArgValue o)
81 return this.getArgIndex() - o.getArgIndex();