01: /**
02: * Objective Database Abstraction Layer (ODAL)
03: * Copyright (c) 2004, The ODAL Development Group
04: * All rights reserved.
05: * For definition of the ODAL Development Group please refer to LICENCE.txt file
06: *
07: * Distributable under LGPL license.
08: * See terms of license at gnu.org.
09: */package com.completex.objective.util.cmd;
10:
11: /**
12: * @author Gennady Krizhevsky
13: */
14: abstract class AbstractArg {
15:
16: private String name;
17: private Object value;
18: private boolean initialized;
19:
20: protected Object getValue() {
21: return value;
22: }
23:
24: protected void setValue(Object value) {
25: this .value = value;
26: }
27:
28: protected AbstractArg(String name, Object value) {
29: this .name = name;
30: this .value = value;
31: }
32:
33: protected AbstractArg(String name) {
34: this .name = name;
35: }
36:
37: public String getName() {
38: return name;
39: }
40:
41: protected void setInitialized(boolean initialized) {
42: this .initialized = initialized;
43: }
44:
45: protected abstract int initialize(String args[], int index);
46:
47: public boolean isInitialized() {
48: return initialized;
49: }
50:
51: public String toString() {
52: String s = "Arg: name = " + name;
53: s += "; value = " + getValue();
54: s += "; is initialized = " + isInitialized();
55: return s;
56: }
57: }
|