View Javadoc
1   /*
2    * sbxb library, part of ULMgen product
3    * Copyright (C) 2003,2005 Thierry Beigbeder
4    *
5    * This program is free software; you can redistribute it and/or modify
6    * it under the terms of the GNU General Public License as published by
7    * the Free Software Foundation; either version 2 of the License, or
8    * (at your option) any later version.
9    *
10   * This program is distributed in the hope that it will be useful,
11   * but WITHOUT ANY WARRANTY; without even the implied warranty of
12   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13   * GNU General Public License for more details.
14   *
15   * You should have received a copy of the GNU General Public License
16   * along with this program; if not, write to the Free Software
17   * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18   */
19  /*
20   * $Header: $
21   * $Revision: $
22   * $Date: $
23   *
24   * History :
25   * Who       yyyy/mm/dd   Action
26   * --------  ----------   ------
27   */
28  
29  
30  package org.otvl.sbxbsamp.simple;
31  
32  
33  // Insert here additional imports
34  
35  
36  
37  
38  /***
39   * 
40   * @author
41   * @version
42   */
43  
44  
45  public class HouseList
46  {
47  	/*-------------------------------------------------------------------------
48  	 * Attributes declaration
49  	 *-------------------------------------------------------------------------*/
50  
51  
52  	/*-------------------------------------------------------------------------
53  	 * Associations declaration
54  	 *-------------------------------------------------------------------------*/
55  	/***
56  	 * 
57  	 */
58  	private java.util.List houses = new java.util.ArrayList() ;
59  
60  
61  	/*-------------------------------------------------------------------------
62  	 * Operations
63  	 *-------------------------------------------------------------------------*/
64  
65  
66  	/*-------------------------------------------------------------------------
67  	 * Attribute accessors
68  	 *-------------------------------------------------------------------------*/
69  
70  
71  	/*-------------------------------------------------------------------------
72  	 * Association accessors
73  	 *-------------------------------------------------------------------------*/
74  	//--------------------------
75  	// Accessors for association houses
76  	//--------------------------
77  	/***
78  	 * Returns a target in link houses.<br/>
79  	 * 
80  	 * @param index offset in the array
81  	 * @return House
82  	 */
83  	public House getHouses(int index) {
84  		House vHouses = (House)houses.get(index);
85  		return vHouses;
86  	}
87  	/***
88  	 * Returns an iterator for targets in links houses
89  	 * @return java.util.Iterator
90  	 */
91  	public  java.util.Iterator iteratorHouses() {
92  		java.util.Iterator vIterator = houses.iterator();
93  		return vIterator;
94  	}
95  	/***
96  	 * Returns the size of the collection houses
97  	 * @return int
98  	 */
99  	public  int sizeHouses() {
100 		int vSize = houses.size();
101 		return vSize;
102 	}
103 
104 	/***
105 	 * Inserts a target in link houses.<br/>
106 	 * 
107 	 * @param index offset in the list
108 	 * @param aHouse The House to insert
109 	 */
110 	public void addHouses(int index, House aHouse) {
111 		this.houses.add(index, aHouse);
112 	}
113 	/***
114 	 * Adds a target at end of link houses.<br/>
115 	 * 
116 	 * @param aHouse The House to insert
117 	 */
118 	public void addHouses(House aHouse) {
119 		this.houses.add(this.houses.size(), aHouse);
120 	}
121 	
122 	/***
123 	 * Removes a target in link houses
124 	 * @param index offset in the list
125 	 */
126 	public void removeHouses(int index) {
127 		this.houses.remove(index);
128 	}
129 	
130 	/***
131 	 * Clears all targets in link houses
132 	 */
133 	public void clearHouses() {
134 		this.houses.clear();
135 	}
136 
137 
138 
139 
140 }