| 1 | package org.etsi.common.configuration; |
|---|
| 2 | |
|---|
| 3 | import org.apache.commons.cli.Option; |
|---|
| 4 | |
|---|
| 5 | public 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 | } |
|---|