01: package org.incava.jagol;
02:
03: import java.io.*;
04: import java.util.*;
05:
06: /**
07: * Represents an option that is an String.
08: */
09: public class StringOption extends NonBooleanOption {
10: private String value;
11:
12: public StringOption(String longName, String description) {
13: this (longName, description, null);
14: }
15:
16: public StringOption(String longName, String description,
17: String value) {
18: super (longName, description);
19: this .value = value;
20: }
21:
22: /**
23: * Returns the value.
24: */
25: public String getValue() {
26: return value;
27: }
28:
29: /**
30: * Sets the value.
31: */
32: public void setValue(String value) {
33: this .value = value;
34: }
35:
36: public String toString() {
37: return value;
38: }
39:
40: protected String getType() {
41: return "string";
42: }
43:
44: }
|