View Javadoc
1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one or more
3    * contributor license agreements.  See the NOTICE file distributed with
4    * this work for additional information regarding copyright ownership.
5    * The ASF licenses this file to You under the Apache License, Version 2.0
6    * (the "License"); you may not use this file except in compliance with
7    * the License.  You may obtain a copy of the License at
8    *
9    *      http://www.apache.org/licenses/LICENSE-2.0
10   *
11   * Unless required by applicable law or agreed to in writing, software
12   * distributed under the License is distributed on an "AS IS" BASIS,
13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   * See the License for the specific language governing permissions and
15   * limitations under the License.
16   */
17  
18  
19  package org.apache.commons.beanutils;
20  
21  
22  /**
23   * Plain old java bean (POJO) for microbenchmarks.
24   *
25   * @version $Id$
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(final 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(final 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(final 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(final 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(final 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(final 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(final short shortProperty) {
128         this.shortProperty = shortProperty;
129     }
130 
131 
132     /**
133      * A String property.
134      */
135     private String stringProperty = "This is a string";
136 
137     public String getStringProperty() {
138         return (this.stringProperty);
139     }
140 
141     public void setStringProperty(final String stringProperty) {
142         this.stringProperty = stringProperty;
143     }
144 
145 
146 }