001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */
017:
018: package org.apache.commons.beanutils;
019:
020: /**
021: * Plain old java bean (POJO) for microbenchmarks.
022: *
023: * @author Craig R. McClanahan
024: * @version $Revision: 438363 $ $Date: 2006-08-30 05:48:00 +0100 (Wed, 30 Aug 2006) $
025: */
026:
027: public class BenchBean {
028:
029: // -------------------------------------------------------------- Properties
030:
031: /**
032: * A boolean property.
033: */
034: private boolean booleanProperty = true;
035:
036: public boolean getBooleanProperty() {
037: return (booleanProperty);
038: }
039:
040: public void setBooleanProperty(boolean booleanProperty) {
041: this .booleanProperty = booleanProperty;
042: }
043:
044: /**
045: * A byte property.
046: */
047: private byte byteProperty = (byte) 121;
048:
049: public byte getByteProperty() {
050: return (this .byteProperty);
051: }
052:
053: public void setByteProperty(byte byteProperty) {
054: this .byteProperty = byteProperty;
055: }
056:
057: /**
058: * A double property.
059: */
060: private double doubleProperty = 321.0;
061:
062: public double getDoubleProperty() {
063: return (this .doubleProperty);
064: }
065:
066: public void setDoubleProperty(double doubleProperty) {
067: this .doubleProperty = doubleProperty;
068: }
069:
070: /**
071: * A float property.
072: */
073: private float floatProperty = (float) 123.0;
074:
075: public float getFloatProperty() {
076: return (this .floatProperty);
077: }
078:
079: public void setFloatProperty(float floatProperty) {
080: this .floatProperty = floatProperty;
081: }
082:
083: /**
084: * An integer property.
085: */
086: private int intProperty = 123;
087:
088: public int getIntProperty() {
089: return (this .intProperty);
090: }
091:
092: public void setIntProperty(int intProperty) {
093: this .intProperty = intProperty;
094: }
095:
096: /**
097: * A long property.
098: */
099: private long longProperty = 321;
100:
101: public long getLongProperty() {
102: return (this .longProperty);
103: }
104:
105: public void setLongProperty(long longProperty) {
106: this .longProperty = longProperty;
107: }
108:
109: /**
110: * A short property.
111: */
112: private short shortProperty = (short) 987;
113:
114: public short getShortProperty() {
115: return (this .shortProperty);
116: }
117:
118: public void setShortProperty(short shortProperty) {
119: this .shortProperty = shortProperty;
120: }
121:
122: /**
123: * A String property.
124: */
125: private String stringProperty = "This is a string";
126:
127: public String getStringProperty() {
128: return (this .stringProperty);
129: }
130:
131: public void setStringProperty(String stringProperty) {
132: this.stringProperty = stringProperty;
133: }
134:
135: }
|