KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > simulator > container > OptionMaker


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package com.tc.simulator.container;
5
6 import org.apache.commons.cli.Option;
7 import org.apache.commons.cli.OptionBuilder;
8
9
10 class OptionMaker {
11
12   public OptionMaker withLongOpt(String JavaDoc opt) {
13     OptionBuilder.withLongOpt(opt);
14     return this;
15   }
16
17   public OptionMaker withValueSeparator() {
18     OptionBuilder.withValueSeparator();
19     return this;
20   }
21
22   public OptionMaker isRequired() {
23     OptionBuilder.isRequired();
24     return this;
25   }
26
27   public OptionMaker withArgName(String JavaDoc name) {
28     OptionBuilder.withArgName(name);
29     return this;
30   }
31
32   public OptionMaker withDescription(String JavaDoc desc) {
33     OptionBuilder.withDescription(desc);
34     return this;
35   }
36
37   public OptionMaker withValueSeparator(char sep) {
38     OptionBuilder.withValueSeparator(sep);
39     return this;
40   }
41
42   public OptionMaker hasArg() {
43     OptionBuilder.hasArg();
44     return this;
45   }
46
47   public Option create() {
48     return OptionBuilder.create();
49   }
50
51   public Option create(char c) {
52     return OptionBuilder.create(c);
53   }
54 }
Popular Tags