602 * as a {@code short} value. 603 * @throws ClassCastException if the parameter at the 604 * specified index is not a {@code Short} 605 * @throws NullPointerException if the parameter at the specified 606 * index is {@code null} 607 * @throws ArrayIndexOutOfBoundsException if {@code index} 608 * is negative or not less than the current size of this 609 * {@code ParameterBlock} object 610 */ 611 public short getShortParameter(int index) { 612 return ((Short)parameters.elementAt(index)).shortValue(); 613 } 614 615 /** 616 * A convenience method to return a parameter as an int. An 617 * exception is thrown if the parameter is 618 * {@code null} or not an {@code Integer}. 619 * 620 * @param index the index of the parameter to be returned. 621 * @return the parameter at the specified index 622 * as a {@code int} value. 623 * @throws ClassCastException if the parameter at the 624 * specified index is not a {@code Integer} 625 * @throws NullPointerException if the parameter at the specified 626 * index is {@code null} 627 * @throws ArrayIndexOutOfBoundsException if {@code index} 628 * is negative or not less than the current size of this 629 * {@code ParameterBlock} object 630 */ 631 public int getIntParameter(int index) { 632 return ((Integer)parameters.elementAt(index)).intValue(); 633 } 634 635 /** 636 * A convenience method to return a parameter as a long. An 637 * exception is thrown if the parameter is 638 * {@code null} or not a {@code Long}. 639 * 640 * @param index the index of the parameter to be returned. 641 * @return the parameter at the specified index 642 * as a {@code long} value. 643 * @throws ClassCastException if the parameter at the 644 * specified index is not a {@code Long} | 602 * as a {@code short} value. 603 * @throws ClassCastException if the parameter at the 604 * specified index is not a {@code Short} 605 * @throws NullPointerException if the parameter at the specified 606 * index is {@code null} 607 * @throws ArrayIndexOutOfBoundsException if {@code index} 608 * is negative or not less than the current size of this 609 * {@code ParameterBlock} object 610 */ 611 public short getShortParameter(int index) { 612 return ((Short)parameters.elementAt(index)).shortValue(); 613 } 614 615 /** 616 * A convenience method to return a parameter as an int. An 617 * exception is thrown if the parameter is 618 * {@code null} or not an {@code Integer}. 619 * 620 * @param index the index of the parameter to be returned. 621 * @return the parameter at the specified index 622 * as an {@code int} value. 623 * @throws ClassCastException if the parameter at the 624 * specified index is not an {@code Integer} 625 * @throws NullPointerException if the parameter at the specified 626 * index is {@code null} 627 * @throws ArrayIndexOutOfBoundsException if {@code index} 628 * is negative or not less than the current size of this 629 * {@code ParameterBlock} object 630 */ 631 public int getIntParameter(int index) { 632 return ((Integer)parameters.elementAt(index)).intValue(); 633 } 634 635 /** 636 * A convenience method to return a parameter as a long. An 637 * exception is thrown if the parameter is 638 * {@code null} or not a {@code Long}. 639 * 640 * @param index the index of the parameter to be returned. 641 * @return the parameter at the specified index 642 * as a {@code long} value. 643 * @throws ClassCastException if the parameter at the 644 * specified index is not a {@code Long} |