320 /**
321 * Adds an object to the list of parameters.
322 * @param obj the <code>Object</code> to add to the
323 * <code>parameters</code> <code>Vector</code>
324 * @return a new <code>ParameterBlock</code> containing
325 * the specified parameter.
326 */
327 public ParameterBlock add(Object obj) {
328 parameters.addElement(obj);
329 return this;
330 }
331
332 /**
333 * Adds a Byte to the list of parameters.
334 * @param b the byte to add to the
335 * <code>parameters</code> <code>Vector</code>
336 * @return a new <code>ParameterBlock</code> containing
337 * the specified parameter.
338 */
339 public ParameterBlock add(byte b) {
340 return add(new Byte(b));
341 }
342
343 /**
344 * Adds a Character to the list of parameters.
345 * @param c the char to add to the
346 * <code>parameters</code> <code>Vector</code>
347 * @return a new <code>ParameterBlock</code> containing
348 * the specified parameter.
349 */
350 public ParameterBlock add(char c) {
351 return add(new Character(c));
352 }
353
354 /**
355 * Adds a Short to the list of parameters.
356 * @param s the short to add to the
357 * <code>parameters</code> <code>Vector</code>
358 * @return a new <code>ParameterBlock</code> containing
359 * the specified parameter.
360 */
361 public ParameterBlock add(short s) {
362 return add(new Short(s));
363 }
364
365 /**
366 * Adds a Integer to the list of parameters.
367 * @param i the int to add to the
368 * <code>parameters</code> <code>Vector</code>
369 * @return a new <code>ParameterBlock</code> containing
370 * the specified parameter.
371 */
372 public ParameterBlock add(int i) {
373 return add(new Integer(i));
374 }
375
376 /**
377 * Adds a Long to the list of parameters.
378 * @param l the long to add to the
379 * <code>parameters</code> <code>Vector</code>
380 * @return a new <code>ParameterBlock</code> containing
381 * the specified parameter.
382 */
424 if (oldSize < newSize) {
425 parameters.setSize(newSize);
426 }
427 parameters.setElementAt(obj, index);
428 return this;
429 }
430
431 /**
432 * Replaces an Object in the list of parameters with a Byte.
433 * If the index lies beyond the current source list,
434 * the list is extended with nulls as needed.
435 * @param b the parameter that replaces the
436 * parameter at the specified index in the
437 * <code>parameters</code> <code>Vector</code>
438 * @param index the index of the parameter to be
439 * replaced with the specified parameter
440 * @return a new <code>ParameterBlock</code> containing
441 * the specified parameter.
442 */
443 public ParameterBlock set(byte b, int index) {
444 return set(new Byte(b), index);
445 }
446
447 /**
448 * Replaces an Object in the list of parameters with a Character.
449 * If the index lies beyond the current source list,
450 * the list is extended with nulls as needed.
451 * @param c the parameter that replaces the
452 * parameter at the specified index in the
453 * <code>parameters</code> <code>Vector</code>
454 * @param index the index of the parameter to be
455 * replaced with the specified parameter
456 * @return a new <code>ParameterBlock</code> containing
457 * the specified parameter.
458 */
459 public ParameterBlock set(char c, int index) {
460 return set(new Character(c), index);
461 }
462
463 /**
464 * Replaces an Object in the list of parameters with a Short.
465 * If the index lies beyond the current source list,
466 * the list is extended with nulls as needed.
467 * @param s the parameter that replaces the
468 * parameter at the specified index in the
469 * <code>parameters</code> <code>Vector</code>
470 * @param index the index of the parameter to be
471 * replaced with the specified parameter
472 * @return a new <code>ParameterBlock</code> containing
473 * the specified parameter.
474 */
475 public ParameterBlock set(short s, int index) {
476 return set(new Short(s), index);
477 }
478
479 /**
480 * Replaces an Object in the list of parameters with an Integer.
481 * If the index lies beyond the current source list,
482 * the list is extended with nulls as needed.
483 * @param i the parameter that replaces the
484 * parameter at the specified index in the
485 * <code>parameters</code> <code>Vector</code>
486 * @param index the index of the parameter to be
487 * replaced with the specified parameter
488 * @return a new <code>ParameterBlock</code> containing
489 * the specified parameter.
490 */
491 public ParameterBlock set(int i, int index) {
492 return set(new Integer(i), index);
493 }
494
495 /**
496 * Replaces an Object in the list of parameters with a Long.
|
320 /**
321 * Adds an object to the list of parameters.
322 * @param obj the <code>Object</code> to add to the
323 * <code>parameters</code> <code>Vector</code>
324 * @return a new <code>ParameterBlock</code> containing
325 * the specified parameter.
326 */
327 public ParameterBlock add(Object obj) {
328 parameters.addElement(obj);
329 return this;
330 }
331
332 /**
333 * Adds a Byte to the list of parameters.
334 * @param b the byte to add to the
335 * <code>parameters</code> <code>Vector</code>
336 * @return a new <code>ParameterBlock</code> containing
337 * the specified parameter.
338 */
339 public ParameterBlock add(byte b) {
340 return add(Byte.valueOf(b));
341 }
342
343 /**
344 * Adds a Character to the list of parameters.
345 * @param c the char to add to the
346 * <code>parameters</code> <code>Vector</code>
347 * @return a new <code>ParameterBlock</code> containing
348 * the specified parameter.
349 */
350 public ParameterBlock add(char c) {
351 return add(Character.valueOf(c));
352 }
353
354 /**
355 * Adds a Short to the list of parameters.
356 * @param s the short to add to the
357 * <code>parameters</code> <code>Vector</code>
358 * @return a new <code>ParameterBlock</code> containing
359 * the specified parameter.
360 */
361 public ParameterBlock add(short s) {
362 return add(Short.valueOf(s));
363 }
364
365 /**
366 * Adds a Integer to the list of parameters.
367 * @param i the int to add to the
368 * <code>parameters</code> <code>Vector</code>
369 * @return a new <code>ParameterBlock</code> containing
370 * the specified parameter.
371 */
372 public ParameterBlock add(int i) {
373 return add(new Integer(i));
374 }
375
376 /**
377 * Adds a Long to the list of parameters.
378 * @param l the long to add to the
379 * <code>parameters</code> <code>Vector</code>
380 * @return a new <code>ParameterBlock</code> containing
381 * the specified parameter.
382 */
424 if (oldSize < newSize) {
425 parameters.setSize(newSize);
426 }
427 parameters.setElementAt(obj, index);
428 return this;
429 }
430
431 /**
432 * Replaces an Object in the list of parameters with a Byte.
433 * If the index lies beyond the current source list,
434 * the list is extended with nulls as needed.
435 * @param b the parameter that replaces the
436 * parameter at the specified index in the
437 * <code>parameters</code> <code>Vector</code>
438 * @param index the index of the parameter to be
439 * replaced with the specified parameter
440 * @return a new <code>ParameterBlock</code> containing
441 * the specified parameter.
442 */
443 public ParameterBlock set(byte b, int index) {
444 return set(Byte.valueOf(b), index);
445 }
446
447 /**
448 * Replaces an Object in the list of parameters with a Character.
449 * If the index lies beyond the current source list,
450 * the list is extended with nulls as needed.
451 * @param c the parameter that replaces the
452 * parameter at the specified index in the
453 * <code>parameters</code> <code>Vector</code>
454 * @param index the index of the parameter to be
455 * replaced with the specified parameter
456 * @return a new <code>ParameterBlock</code> containing
457 * the specified parameter.
458 */
459 public ParameterBlock set(char c, int index) {
460 return set(Character.valueOf(c), index);
461 }
462
463 /**
464 * Replaces an Object in the list of parameters with a Short.
465 * If the index lies beyond the current source list,
466 * the list is extended with nulls as needed.
467 * @param s the parameter that replaces the
468 * parameter at the specified index in the
469 * <code>parameters</code> <code>Vector</code>
470 * @param index the index of the parameter to be
471 * replaced with the specified parameter
472 * @return a new <code>ParameterBlock</code> containing
473 * the specified parameter.
474 */
475 public ParameterBlock set(short s, int index) {
476 return set(Short.valueOf(s), index);
477 }
478
479 /**
480 * Replaces an Object in the list of parameters with an Integer.
481 * If the index lies beyond the current source list,
482 * the list is extended with nulls as needed.
483 * @param i the parameter that replaces the
484 * parameter at the specified index in the
485 * <code>parameters</code> <code>Vector</code>
486 * @param index the index of the parameter to be
487 * replaced with the specified parameter
488 * @return a new <code>ParameterBlock</code> containing
489 * the specified parameter.
490 */
491 public ParameterBlock set(int i, int index) {
492 return set(new Integer(i), index);
493 }
494
495 /**
496 * Replaces an Object in the list of parameters with a Long.
|