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  package org.apache.commons.betwixt.dotbetwixt;
18  
19  /*** 
20    * This is a simple bean that allow an instance to contain another instance.
21    *
22    * @author Robert Burrell Donkin
23    */
24  public class RecursiveBean {
25      
26  //-------------------------- Attributes
27      private String name;
28      
29      private RecursiveBean child;
30      
31  //-------------------------- Constructors
32      public RecursiveBean() {}
33      
34      public RecursiveBean(String name) {
35          setName(name);
36      }
37      
38      public RecursiveBean(String name, RecursiveBean bean) {
39          setName(name);
40          setChild(bean);
41      }
42          
43  //--------------------------- Properties
44      public String getName() {
45          return name;
46      }
47      
48      public void setName(String name) {
49          this.name = name;
50      }
51      
52      public RecursiveBean getChild() {
53          return child;
54      }
55      
56      public void setChild(RecursiveBean child) {
57          this.child = child;
58      }
59  }