1 | PropertyIterator iterator() {↵ | | 1 | PropertyIterator iterator() {↵
|
2 | return getArguments().iterator();↵ | | 2 | return getArguments().iterator();↵
|
3 | }↵ | | 3 | }↵
|
|
4 | /**↵ | | 4 | /**↵
|
5 | * Create a string representation of the arguments.↵ | | 5 | * Create a string representation of the arguments.↵
|
6 | * ↵ | | 6 | * ↵
|
7 | * @return the string representation of the arguments↵ | | 7 | * @return the string representation of the arguments↵
|
8 | */↵ | | 8 | */↵
|
9 | public String toString() {↵ | | 9 | public String toString() {↵
|
10 | StringBuffer str = new StringBuffer();↵ | | 10 | StringBuffer str = new StringBuffer();↵
|
11 | PropertyIterator iter = getArguments().iterator();↵ | | 11 | PropertyIterator iter = getArguments().iterator();↵
|
12 | while (iter.hasNext()) {↵ | | 12 | while (iter.hasNext()) {↵
|
13 | LDAPArgument arg = (LDAPArgument) iter.next().getObjectValue();↵ | | 13 | Argument arg = (Argument) iter.next().getObjectValue();↵
|
14 | final String metaData = arg.getMetaData();↵ | | 14 | final String metaData = arg.getMetaData();↵
|
15 | str.append(arg.getName());↵ | | 15 | str.append(arg.getName());↵
|
16 | if (metaData == null) {↵ | | 16 | if (metaData == null) {↵
|
17 | str.append("="); //$NON-NLS$↵ | | 17 | str.append("="); //$NON-NLS-1$↵
|
18 | } else {↵ | | 18 | } else {↵
|
19 | str.append(metaData);↵ | | 19 | str.append(metaData);↵
|
20 | }↵ | | 20 | }↵
|
21 | str.append(arg.getValue());↵ | | 21 | str.append(arg.getValue());↵
|
22 | if (iter.hasNext()) {↵ | | 22 | if (iter.hasNext()) {↵
|
23 | str.append("&"); //$NON-NLS$↵ | | 23 | str.append("&"); //$NON-NLS-1$↵
|
24 | }↵ | | 24 | }↵
|
25 | }↵ | | 25 | }↵
|
26 | return str.toString();↵ | | 26 | return str.toString();↵
|
27 | }↵ | | 27 | }↵
|
|
28 | /**↵ | | 28 | /**↵
|
29 | * Remove the specified argument from the list.↵ | | 29 | * Remove the specified argument from the list.↵
|
30 | * ↵ | | 30 | * ↵
|
31 | * @param row↵ | | 31 | * @param row↵
|
32 | * the index of the argument to remove↵ | | 32 | * the index of the argument to remove↵
|
33 | */↵ | | 33 | */↵
|
34 | public void removeArgument(int row) {↵ | | 34 | public void removeArgument(int row) {↵
|
35 | if (row < getArguments().size()) {↵ | | 35 | if (row < getArguments().size()) {↵
|
36 | getArguments().remove(row);↵ | | 36 | getArguments().remove(row);↵
|
37 | }↵ | | 37 | }↵
|
38 | }↵ | | 38 | }↵
|
|
39 | /**↵ | | 39 | /**↵
|
40 | * Remove the specified argument from the list.↵ | | 40 | * Remove the specified argument from the list.↵
|
41 | * ↵ | | 41 | * ↵
|
42 | * @param arg↵ | | 42 | * @param arg↵
|
43 | * the argument to remove↵ | | 43 | * the argument to remove↵
|
44 | */↵ | | 44 | */↵
|
45 | public void removeArgument(LDAPArgument arg) {↵ | | 45 | public void removeArgument(Argument arg) {↵
|
46 | PropertyIterator iter = getArguments().iterator();↵ | | 46 | PropertyIterator iter = getArguments().iterator();↵
|
47 | while (iter.hasNext()) {↵ | | 47 | while (iter.hasNext()) {↵
|
48 | LDAPArgument item = (LDAPArgument) iter.next().getObjectValue();↵ | | 48 | Argument item = (Argument) iter.next().getObjectValue();↵
|
49 | if (arg.equals(item)) {↵ | | 49 | if (arg.equals(item)) {↵
|
50 | iter.remove();↵ | | 50 | iter.remove();↵
|
51 | }↵ | | 51 | }↵
|
52 | }↵ | | 52 | }↵
|
53 | }↵ | | 53 | }↵
|
|
54 | /**↵ | | 54 | /**↵
|
55 | * Remove the argument with the specified name.↵ | | 55 | * Remove the argument with the specified name.↵
|
56 | * ↵ | | 56 | * ↵
|
57 | * @param argName↵ | | 57 | * @param argName↵
|
58 | * the name of the argument to remove↵ | | 58 | * the name of the argument to remove↵
|
59 | */↵ | | 59 | */↵
|
60 | public void removeArgument(String argName) {↵ | | 60 | public void removeArgument(String argName) {↵
|
61 | PropertyIterator iter = getArguments().iterator();↵ | | 61 | PropertyIterator iter = getArguments().iterator();↵
|
62 | while (iter.hasNext()) {↵ | | 62 | while (iter.hasNext()) {↵
|
63 | LDAPArgument arg = (LDAPArgument) iter.next().getObjectValue();↵ | | 63 | Argument arg = (Argument) iter.next().getObjectValue();↵
|
64 | if (arg.getName().equals(argName)) {↵ | | 64 | if (arg.getName().equals(argName)) {↵
|
65 | iter.remove();↵ | | 65 | iter.remove();↵
|
66 | }↵ | | 66 | }↵
|
67 | }↵ | | 67 | }↵
|
68 | }↵ | | 68 | }↵
|
|
69 | /**↵ | | 69 | /**↵
|
70 | * Remove all arguments from the list.↵ | | 70 | * Remove all arguments from the list.↵
|
71 | */↵ | | 71 | */↵
|
72 | public void removeAllArguments() {↵ | | 72 | public void removeAllArguments() {↵
|
73 | getArguments().clear();↵ | | 73 | getArguments().clear();↵
|
74 | | | 74 |
|