KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > commons > beanutils > BenchBean


1 /*
2  * Copyright 2001-2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17
18 package org.apache.commons.beanutils;
19
20
21 /**
22  * Plain old java bean (POJO) for microbenchmarks.
23  *
24  * @author Craig R. McClanahan
25  * @version $Revision: 1.4 $ $Date: 2004/02/28 13:18:36 $
26  */

27
28 public class BenchBean {
29
30
31     // -------------------------------------------------------------- Properties
32

33
34     /**
35      * A boolean property.
36      */

37     private boolean booleanProperty = true;
38
39     public boolean getBooleanProperty() {
40         return (booleanProperty);
41     }
42
43     public void setBooleanProperty(boolean booleanProperty) {
44         this.booleanProperty = booleanProperty;
45     }
46
47
48     /**
49      * A byte property.
50      */

51     private byte byteProperty = (byte) 121;
52
53     public byte getByteProperty() {
54         return (this.byteProperty);
55     }
56
57     public void setByteProperty(byte byteProperty) {
58         this.byteProperty = byteProperty;
59     }
60
61
62     /**
63      * A double property.
64      */

65     private double doubleProperty = 321.0;
66
67     public double getDoubleProperty() {
68         return (this.doubleProperty);
69     }
70
71     public void setDoubleProperty(double doubleProperty) {
72         this.doubleProperty = doubleProperty;
73     }
74
75
76     /**
77      * A float property.
78      */

79     private float floatProperty = (float) 123.0;
80
81     public float getFloatProperty() {
82         return (this.floatProperty);
83     }
84
85     public void setFloatProperty(float floatProperty) {
86         this.floatProperty = floatProperty;
87     }
88
89
90     /**
91      * An integer property.
92      */

93     private int intProperty = 123;
94
95     public int getIntProperty() {
96         return (this.intProperty);
97     }
98
99     public void setIntProperty(int intProperty) {
100         this.intProperty = intProperty;
101     }
102
103
104     /**
105      * A long property.
106      */

107     private long longProperty = 321;
108
109     public long getLongProperty() {
110         return (this.longProperty);
111     }
112
113     public void setLongProperty(long longProperty) {
114         this.longProperty = longProperty;
115     }
116
117
118     /**
119      * A short property.
120      */

121     private short shortProperty = (short) 987;
122
123     public short getShortProperty() {
124         return (this.shortProperty);
125     }
126
127     public void setShortProperty(short shortProperty) {
128         this.shortProperty = shortProperty;
129     }
130
131
132     /**
133      * A String property.
134      */

135     private String JavaDoc stringProperty = "This is a string";
136
137     public String JavaDoc getStringProperty() {
138         return (this.stringProperty);
139     }
140
141     public void setStringProperty(String JavaDoc stringProperty) {
142         this.stringProperty = stringProperty;
143     }
144
145
146 }
147
Popular Tags