KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > inversoft > verge > util > test > Bean1


1 /*
2  * Copyright (c) 2003, Inversoft
3  *
4  * This software is distribuable under the GNU Lesser General Public License.
5  * For more information visit gnu.org.
6  */

7 package com.inversoft.verge.util.test;
8
9
10 /**
11  * This class is a simple JavaBean that is used in testing.
12  *
13  * @author Brian Pontarelli
14  */

15 public class Bean1 {
16
17     private Bean2 property1;
18     private Bean4 property4;
19     private Bean2 [] array = new Bean2[1];
20     private String JavaDoc string1;
21
22
23     /** Gets the property1 property */
24     public Bean2 getProperty1(){
25         return property1;
26     }
27
28     /** Sets the property1 property */
29     public void setProperty1(Bean2 value) {
30         this.property1 = value;
31     }
32
33     /** Gets the Property4 property */
34     public Bean4 getProperty4() {
35         return property4;
36     }
37
38     /** Sets the Property4 property */
39     public void setProperty4(Bean4 value) {
40         property4 = value;
41     }
42
43     /** Gets the indexed property. If index is out of bounds, null is returned */
44     public Bean2 getIndexed(int index) {
45         if (index >= array.length) {
46             return null;
47         }
48
49         return array[index];
50     }
51
52     /** Sets the indexed property. If index is out of bounds, an exception is thrown*/
53     public void setIndexed(int index, Bean2 value) {
54         array[index] = value;
55     }
56     
57     /** Gets the String1 property */
58     public String JavaDoc getString1() {
59         return string1;
60     }
61
62     /** Sets the String1 property */
63     public void setString1(String JavaDoc value) {
64         string1 = value;
65     }
66 }
67
Popular Tags