KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > commons > digester > SimpleTestBean


1 /* $Id: SimpleTestBean.java 155412 2005-02-26 12:58:36Z dirkv $
2  *
3  * Copyright 2001-2004 The Apache Software Foundation.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * 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.digester;
20
21
22 /**
23  * <p> As it's name suggests just a simple bean used for testing.
24  */

25 public class SimpleTestBean {
26
27     private String JavaDoc alpha;
28
29     private String JavaDoc beta;
30
31     private String JavaDoc gamma;
32
33     private String JavaDoc delta;
34
35     public String JavaDoc getAlpha() {
36         return alpha;
37     }
38
39     public void setAlpha(String JavaDoc alpha) {
40         this.alpha = alpha;
41     }
42
43     public String JavaDoc getBeta() {
44         return beta;
45     }
46
47     public void setBeta(String JavaDoc beta) {
48         this.beta = beta;
49     }
50
51     public String JavaDoc getGamma() {
52         return gamma;
53     }
54
55     public void setGamma(String JavaDoc gamma) {
56         this.gamma = gamma;
57     }
58
59     public String JavaDoc getDeltaValue() { // Retrieves "write only" value
60
return delta;
61     }
62
63     public void setDelta(String JavaDoc delta) { // "delta" is a write-only property
64
this.delta = delta;
65     }
66     
67     public void setAlphaBeta(String JavaDoc alpha, String JavaDoc beta) {
68         setAlpha(alpha);
69         setBeta(beta);
70     }
71
72     public String JavaDoc toString() {
73         StringBuffer JavaDoc sb = new StringBuffer JavaDoc("[SimpleTestBean]");
74         sb.append(" alpha=");
75         sb.append(alpha);
76         sb.append(" beta=");
77         sb.append(beta);
78         sb.append(" gamma=");
79         sb.append(gamma);
80         sb.append(" delta=");
81         sb.append(delta);
82
83         return sb.toString();
84     }
85 }
86
Popular Tags