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    *      https://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  package org.apache.commons.beanutils2;
19  
20  /**
21   * Plain old Java bean (POJO) for microbenchmarks.
22   */
23  
24  public class BenchBean {
25  
26      /**
27       * A boolean property.
28       */
29      private boolean booleanProperty = true;
30  
31      /**
32       * A byte property.
33       */
34      private byte byteProperty = (byte) 121;
35  
36      /**
37       * A double property.
38       */
39      private double doubleProperty = 321.0;
40  
41      /**
42       * A float property.
43       */
44      private float floatProperty = (float) 123.0;
45  
46      /**
47       * An integer property.
48       */
49      private int intProperty = 123;
50  
51      /**
52       * A long property.
53       */
54      private long longProperty = 321;
55  
56      /**
57       * A short property.
58       */
59      private short shortProperty = (short) 987;
60  
61      /**
62       * A String property.
63       */
64      private String stringProperty = "This is a string";
65  
66      public boolean getBooleanProperty() {
67          return booleanProperty;
68      }
69  
70      public byte getByteProperty() {
71          return this.byteProperty;
72      }
73  
74      public double getDoubleProperty() {
75          return this.doubleProperty;
76      }
77  
78      public float getFloatProperty() {
79          return this.floatProperty;
80      }
81  
82      public int getIntProperty() {
83          return this.intProperty;
84      }
85  
86      public long getLongProperty() {
87          return this.longProperty;
88      }
89  
90      public short getShortProperty() {
91          return this.shortProperty;
92      }
93  
94      public String getStringProperty() {
95          return this.stringProperty;
96      }
97  
98      public void setBooleanProperty(final boolean booleanProperty) {
99          this.booleanProperty = booleanProperty;
100     }
101 
102     public void setByteProperty(final byte byteProperty) {
103         this.byteProperty = byteProperty;
104     }
105 
106     public void setDoubleProperty(final double doubleProperty) {
107         this.doubleProperty = doubleProperty;
108     }
109 
110     public void setFloatProperty(final float floatProperty) {
111         this.floatProperty = floatProperty;
112     }
113 
114     public void setIntProperty(final int intProperty) {
115         this.intProperty = intProperty;
116     }
117 
118     public void setLongProperty(final long longProperty) {
119         this.longProperty = longProperty;
120     }
121 
122     public void setShortProperty(final short shortProperty) {
123         this.shortProperty = shortProperty;
124     }
125 
126     public void setStringProperty(final String stringProperty) {
127         this.stringProperty = stringProperty;
128     }
129 
130 }