233 }
234
235 /**
236 * Retrieves the address at index posn.
237 * @param posn The index of the address to retrieve.
238 * @return The address at the 0-based index posn. It must be in the
239 * range [0,getAddressCount()).
240 * @exception ArrayIndexOutOfBoundsException If posn not in the specified
241 * range.
242 */
243 public RefAddr get(int posn) {
244 return addrs.elementAt(posn);
245 }
246
247 /**
248 * Retrieves an enumeration of the addresses in this reference.
249 * When addresses are added, changed or removed from this reference,
250 * its effects on this enumeration are undefined.
251 *
252 * @return An non-null enumeration of the addresses
253 * (<tt>RefAddr</tt>) in this reference.
254 * If this reference has zero addresses, an enumeration with
255 * zero elements is returned.
256 */
257 public Enumeration<RefAddr> getAll() {
258 return addrs.elements();
259 }
260
261 /**
262 * Retrieves the number of addresses in this reference.
263 *
264 * @return The nonnegative number of addresses in this reference.
265 */
266 public int size() {
267 return addrs.size();
268 }
269
270 /**
271 * Adds an address to the end of the list of addresses.
272 *
273 * @param addr The non-null address to add.
|
233 }
234
235 /**
236 * Retrieves the address at index posn.
237 * @param posn The index of the address to retrieve.
238 * @return The address at the 0-based index posn. It must be in the
239 * range [0,getAddressCount()).
240 * @exception ArrayIndexOutOfBoundsException If posn not in the specified
241 * range.
242 */
243 public RefAddr get(int posn) {
244 return addrs.elementAt(posn);
245 }
246
247 /**
248 * Retrieves an enumeration of the addresses in this reference.
249 * When addresses are added, changed or removed from this reference,
250 * its effects on this enumeration are undefined.
251 *
252 * @return An non-null enumeration of the addresses
253 * ({@code RefAddr}) in this reference.
254 * If this reference has zero addresses, an enumeration with
255 * zero elements is returned.
256 */
257 public Enumeration<RefAddr> getAll() {
258 return addrs.elements();
259 }
260
261 /**
262 * Retrieves the number of addresses in this reference.
263 *
264 * @return The nonnegative number of addresses in this reference.
265 */
266 public int size() {
267 return addrs.size();
268 }
269
270 /**
271 * Adds an address to the end of the list of addresses.
272 *
273 * @param addr The non-null address to add.
|