source: trunk/org.etsi.common/src/org/etsi/common/configuration/OptionWithID.java @ 7

Last change on this file since 7 was 7, checked in by phdmakk, 14 years ago
  • Property svn:mime-type set to text/plain
File size: 1022 bytes
Line 
1package org.etsi.common.configuration;
2
3import org.apache.commons.cli.Option;
4
5public class OptionWithID extends Option {
6
7        /**
8         *
9         */
10        private static final long serialVersionUID = -2643329397818768355L;
11        private int id;
12       
13        public OptionWithID(String opt, String longOpt, boolean hasArg,
14                        String description) throws IllegalArgumentException {
15                super(opt, longOpt, hasArg, description);
16        }
17
18        public OptionWithID(String longOpt, boolean hasArg,
19                        String description) throws IllegalArgumentException {
20                super(null, longOpt, hasArg, description);
21        }
22       
23        public OptionWithID(int id, String longOpt, boolean hasArg,
24                        String description) throws IllegalArgumentException {
25                super(null, longOpt, hasArg, description);
26                this.setId(id);
27        }
28       
29        public OptionWithID(int id, String longOpt,
30                        String description) throws IllegalArgumentException {
31                super(null, description);
32                this.setLongOpt(longOpt);
33                this.setId(id);
34        }
35       
36        public void setId(int id) {
37                this.id = id;
38        }
39       
40        public int getId() {
41                return this.id;
42        }
43       
44
45}
Note: See TracBrowser for help on using the repository browser.