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;
18  
19  import java.util.Map;
20  import java.util.TreeMap;
21  
22  /*** <p><code>MapBean</code> is a sample bean used for testing maps.</p>
23    *
24    * @author <a href="mailto:rdonkin@apache.org">Robert Burrell Donkin</a>
25    * @version $Revision: 155402 $
26    */
27  public class MapBean {
28      
29      private String title = "**UNSET**";
30      
31      private Map addresses = new TreeMap();
32      
33      public MapBean() {}
34      
35      public MapBean(String title) {
36          setTitle(title);
37      }	
38      
39      public String getTitle() {
40          return title;
41      }
42      
43      public void setTitle(String title) {
44          this.title = title;
45      }	
46      
47      public Map getAddresses() {
48          return addresses;
49      }	
50      
51      public void addAddress(String name, AddressBean address) {
52          addresses.put(name, address);
53      }
54  }