1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.apache.commons.beanutils;
21
22 import java.util.List;
23 import java.util.ArrayList;
24
25 /***
26 * Indexed Properties Test bean for JUnit tests for the "beanutils" component.
27 *
28 * @author Niall Pemberton
29 * @version $Revision: 438363 $ $Date: 2006-08-30 05:48:00 +0100 (Wed, 30 Aug 2006) $
30 */
31 public class IndexedTestBean {
32
33 private String[] stringArray;
34 private List stringList;
35 private ArrayList arrayList;
36
37
38
39
40 /***
41 * Default Constructor.
42 */
43 public IndexedTestBean() {
44 }
45
46 /***
47 * Getter for the String[] property.
48 */
49 public String[] getStringArray() {
50 return stringArray;
51 }
52
53 /***
54 * Setter for the String[] property.
55 */
56 public void setStringArray(String[] stringArray) {
57 this.stringArray = stringArray;
58 }
59
60 /***
61 * Indexed Getter for the String[] property.
62 */
63 public String getStringArray(int index) {
64 return (String)stringArray[index];
65 }
66
67 /***
68 * Indexed Setter for the String[] property.
69 */
70 public void setStringArray(int index, String value) {
71 stringArray[index] = value;
72 }
73
74 /***
75 * Getter for the java.util.List property.
76 */
77 public List getStringList() {
78 return stringList;
79 }
80
81 /***
82 * Setter for the java.util.List property.
83 */
84 public void setStringList(List stringList) {
85 this.stringList = stringList;
86 }
87
88 /***
89 * Indexed Getter for the java.util.List property.
90 */
91 public String getStringList(int index) {
92 return (String)stringList.get(index);
93 }
94
95 /***
96 * Indexed Setter for the java.util.List property.
97 */
98 public void setStringList(int index, String value) {
99 stringList.add(index, value);
100 }
101
102 /***
103 * Getter for the java.util.ArrayList property.
104 */
105 public ArrayList getArrayList() {
106 return arrayList;
107 }
108
109 /***
110 * Setter for the java.util.ArrayList property.
111 */
112 public void setArrayList(ArrayList arrayList) {
113 this.arrayList = arrayList;
114 }
115
116 /***
117 * Indexed Getter for the java.util.ArrayList property.
118 */
119 public Object getArrayList(int index) {
120 return arrayList.get(index);
121 }
122
123 /***
124 * Indexed Setter for the java.util.ArrayList property.
125 */
126 public void setArrayList(int index, Object value) {
127 arrayList.add(index, value);
128 }
129
130 }