1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.4.2_05) on Thu Sep 09 20:36:09 PDT 2004 -->
<TITLE>
ShortArrayList (Colt 1.2.0 - API Specification)
</TITLE>
<META NAME="keywords" CONTENT="cern.colt.list.ShortArrayList class">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="ShortArrayList (Colt 1.2.0 - API Specification)";
}
</SCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ShortArrayList.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<b>Colt 1.2.0</b></EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../cern/colt/list/ObjectArrayList.html" title="class in cern.colt.list"><B>PREV CLASS</B></A>
<A HREF="../../../cern/colt/list/SimpleLongArrayList.html" title="class in cern.colt.list"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html" target="_top"><B>FRAMES</B></A>
<A HREF="ShortArrayList.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | <A HREF="#fields_inherited_from_class_cern.colt.PersistentObject">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
cern.colt.list</FONT>
<BR>
Class ShortArrayList</H2>
<PRE>
<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">java.lang.Object</A>
<IMG SRC="../../../resources/inherit.gif" ALT="extended by"><A HREF="../../../cern/colt/PersistentObject.html" title="class in cern.colt">cern.colt.PersistentObject</A>
<IMG SRC="../../../resources/inherit.gif" ALT="extended by"><A HREF="../../../cern/colt/list/AbstractCollection.html" title="class in cern.colt.list">cern.colt.list.AbstractCollection</A>
<IMG SRC="../../../resources/inherit.gif" ALT="extended by"><A HREF="../../../cern/colt/list/AbstractList.html" title="class in cern.colt.list">cern.colt.list.AbstractList</A>
<IMG SRC="../../../resources/inherit.gif" ALT="extended by"><A HREF="../../../cern/colt/list/AbstractShortList.html" title="class in cern.colt.list">cern.colt.list.AbstractShortList</A>
<IMG SRC="../../../resources/inherit.gif" ALT="extended by"><B>cern.colt.list.ShortArrayList</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Cloneable.html" title="class or interface in java.lang">Cloneable</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/Serializable.html" title="class or interface in java.io">Serializable</A></DD>
</DL>
<HR>
<DL>
<DT>public class <B>ShortArrayList</B><DT>extends <A HREF="../../../cern/colt/list/AbstractShortList.html" title="class in cern.colt.list">AbstractShortList</A></DL>
<P>
Resizable list holding <code>short</code> elements; implemented with arrays.
First see the <a href="package-summary.html">package summary</a> and javadoc <a href="package-tree.html">tree view</a> to get the broad picture.
<P>
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../serialized-form.html#cern.colt.list.ShortArrayList">Serialized Form</A></DL>
<HR>
<P>
<!-- ======== NESTED CLASS SUMMARY ======== -->
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Field Summary</B></FONT></TD>
</TR>
</TABLE>
<A NAME="fields_inherited_from_class_cern.colt.PersistentObject"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Fields inherited from class cern.colt.<A HREF="../../../cern/colt/PersistentObject.html" title="class in cern.colt">PersistentObject</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../cern/colt/PersistentObject.html#serialVersionUID">serialVersionUID</A></CODE></TD>
</TR>
</TABLE>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../cern/colt/list/ShortArrayList.html#ShortArrayList()">ShortArrayList</A></B>()</CODE>
<BR>
Constructs an empty list.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../cern/colt/list/ShortArrayList.html#ShortArrayList(int)">ShortArrayList</A></B>(int initialCapacity)</CODE>
<BR>
Constructs an empty list with the specified initial capacity.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../cern/colt/list/ShortArrayList.html#ShortArrayList(short[])">ShortArrayList</A></B>(short[] elements)</CODE>
<BR>
Constructs a list containing the specified elements.</TD>
</TR>
</TABLE>
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../cern/colt/list/ShortArrayList.html#add(short)">add</A></B>(short element)</CODE>
<BR>
Appends the specified element to the end of this list.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../cern/colt/list/ShortArrayList.html#beforeInsert(int, short)">beforeInsert</A></B>(int index,
short element)</CODE>
<BR>
Inserts the specified element before the specified position into the receiver.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../cern/colt/list/ShortArrayList.html#binarySearchFromTo(short, int, int)">binarySearchFromTo</A></B>(short key,
int from,
int to)</CODE>
<BR>
Searches the receiver for the specified value using
the binary search algorithm.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../cern/colt/list/ShortArrayList.html#clone()">clone</A></B>()</CODE>
<BR>
Returns a deep copy of the receiver.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../cern/colt/list/ShortArrayList.html" title="class in cern.colt.list">ShortArrayList</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../cern/colt/list/ShortArrayList.html#copy()">copy</A></B>()</CODE>
<BR>
Returns a deep copy of the receiver; uses <code>clone()</code> and casts the result.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> short[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../cern/colt/list/ShortArrayList.html#elements()">elements</A></B>()</CODE>
<BR>
Returns the elements currently stored, including invalid elements between size and capacity, if any.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../cern/colt/list/AbstractShortList.html" title="class in cern.colt.list">AbstractShortList</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../cern/colt/list/ShortArrayList.html#elements(short[])">elements</A></B>(short[] elements)</CODE>
<BR>
Sets the receiver's elements to be the specified array (not a copy of it).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../cern/colt/list/ShortArrayList.html#ensureCapacity(int)">ensureCapacity</A></B>(int minCapacity)</CODE>
<BR>
Ensures that the receiver can hold at least the specified number of elements without needing to allocate new internal memory.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../cern/colt/list/ShortArrayList.html#equals(java.lang.Object)">equals</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> otherObj)</CODE>
<BR>
Compares the specified Object with the receiver.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../cern/colt/list/ShortArrayList.html#forEach(cern.colt.function.ShortProcedure)">forEach</A></B>(<A HREF="../../../cern/colt/function/ShortProcedure.html" title="interface in cern.colt.function">ShortProcedure</A> procedure)</CODE>
<BR>
Applies a procedure to each element of the receiver, if any.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> short</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../cern/colt/list/ShortArrayList.html#get(int)">get</A></B>(int index)</CODE>
<BR>
Returns the element at the specified position in the receiver.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> short</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../cern/colt/list/ShortArrayList.html#getQuick(int)">getQuick</A></B>(int index)</CODE>
<BR>
Returns the element at the specified position in the receiver; <b>WARNING:</b> Does not check preconditions.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../cern/colt/list/ShortArrayList.html#indexOfFromTo(short, int, int)">indexOfFromTo</A></B>(short element,
int from,
int to)</CODE>
<BR>
Returns the index of the first occurrence of the specified
element.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../cern/colt/list/ShortArrayList.html#lastIndexOfFromTo(short, int, int)">lastIndexOfFromTo</A></B>(short element,
int from,
int to)</CODE>
<BR>
Returns the index of the last occurrence of the specified
element.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../cern/colt/list/AbstractShortList.html" title="class in cern.colt.list">AbstractShortList</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../cern/colt/list/ShortArrayList.html#partFromTo(int, int)">partFromTo</A></B>(int from,
int to)</CODE>
<BR>
Returns a new list of the part of the receiver between <code>from</code>, inclusive, and <code>to</code>, inclusive.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../cern/colt/list/ShortArrayList.html#removeAll(cern.colt.list.AbstractShortList)">removeAll</A></B>(<A HREF="../../../cern/colt/list/AbstractShortList.html" title="class in cern.colt.list">AbstractShortList</A> other)</CODE>
<BR>
Removes from the receiver all elements that are contained in the specified list.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../cern/colt/list/ShortArrayList.html#replaceFromToWithFrom(int, int, cern.colt.list.AbstractShortList, int)">replaceFromToWithFrom</A></B>(int from,
int to,
<A HREF="../../../cern/colt/list/AbstractShortList.html" title="class in cern.colt.list">AbstractShortList</A> other,
int otherFrom)</CODE>
<BR>
Replaces a number of elements in the receiver with the same number of elements of another list.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../cern/colt/list/ShortArrayList.html#retainAll(cern.colt.list.AbstractShortList)">retainAll</A></B>(<A HREF="../../../cern/colt/list/AbstractShortList.html" title="class in cern.colt.list">AbstractShortList</A> other)</CODE>
<BR>
Retains (keeps) only the elements in the receiver that are contained in the specified other list.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../cern/colt/list/ShortArrayList.html#reverse()">reverse</A></B>()</CODE>
<BR>
Reverses the elements of the receiver.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../cern/colt/list/ShortArrayList.html#set(int, short)">set</A></B>(int index,
short element)</CODE>
<BR>
Replaces the element at the specified position in the receiver with the specified element.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../cern/colt/list/ShortArrayList.html#setQuick(int, short)">setQuick</A></B>(int index,
short element)</CODE>
<BR>
Replaces the element at the specified position in the receiver with the specified element; <b>WARNING:</b> Does not check preconditions.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../cern/colt/list/ShortArrayList.html#shuffleFromTo(int, int)">shuffleFromTo</A></B>(int from,
int to)</CODE>
<BR>
Randomly permutes the part of the receiver between <code>from</code> (inclusive) and <code>to</code> (inclusive).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../cern/colt/list/ShortArrayList.html#sortFromTo(int, int)">sortFromTo</A></B>(int from,
int to)</CODE>
<BR>
Sorts the specified range of the receiver into ascending order.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../cern/colt/list/ShortArrayList.html#trimToSize()">trimToSize</A></B>()</CODE>
<BR>
Trims the capacity of the receiver to be the receiver's current
size.</TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_cern.colt.list.AbstractShortList"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class cern.colt.list.<A HREF="../../../cern/colt/list/AbstractShortList.html" title="class in cern.colt.list">AbstractShortList</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../cern/colt/list/AbstractShortList.html#addAllOfFromTo(cern.colt.list.AbstractShortList, int, int)">addAllOfFromTo</A>, <A HREF="../../../cern/colt/list/AbstractShortList.html#beforeInsertAllOfFromTo(int, cern.colt.list.AbstractShortList, int, int)">beforeInsertAllOfFromTo</A>, <A HREF="../../../cern/colt/list/AbstractShortList.html#binarySearch(short)">binarySearch</A>, <A HREF="../../../cern/colt/list/AbstractShortList.html#contains(short)">contains</A>, <A HREF="../../../cern/colt/list/AbstractShortList.html#delete(short)">delete</A>, <A HREF="../../../cern/colt/list/AbstractShortList.html#fillFromToWith(int, int, short)">fillFromToWith</A>, <A HREF="../../../cern/colt/list/AbstractShortList.html#indexOf(short)">indexOf</A>, <A HREF="../../../cern/colt/list/AbstractShortList.html#lastIndexOf(short)">lastIndexOf</A>, <A HREF="../../../cern/colt/list/AbstractShortList.html#mergeSortFromTo(int, int)">mergeSortFromTo</A>, <A HREF="../../../cern/colt/list/AbstractShortList.html#mergeSortFromTo(int, int, cern.colt.function.ShortComparator)">mergeSortFromTo</A>, <A HREF="../../../cern/colt/list/AbstractShortList.html#quickSortFromTo(int, int)">quickSortFromTo</A>, <A HREF="../../../cern/colt/list/AbstractShortList.html#quickSortFromTo(int, int, cern.colt.function.ShortComparator)">quickSortFromTo</A>, <A HREF="../../../cern/colt/list/AbstractShortList.html#removeFromTo(int, int)">removeFromTo</A>, <A HREF="../../../cern/colt/list/AbstractShortList.html#replaceFromToWithFromTo(int, int, cern.colt.list.AbstractShortList, int, int)">replaceFromToWithFromTo</A>, <A HREF="../../../cern/colt/list/AbstractShortList.html#replaceFromWith(int, java.util.Collection)">replaceFromWith</A>, <A HREF="../../../cern/colt/list/AbstractShortList.html#size()">size</A>, <A HREF="../../../cern/colt/list/AbstractShortList.html#times(int)">times</A>, <A HREF="../../../cern/colt/list/AbstractShortList.html#toList()">toList</A>, <A HREF="../../../cern/colt/list/AbstractShortList.html#toString()">toString</A></CODE></TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_cern.colt.list.AbstractList"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class cern.colt.list.<A HREF="../../../cern/colt/list/AbstractList.html" title="class in cern.colt.list">AbstractList</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../cern/colt/list/AbstractList.html#addAllOf(java.util.Collection)">addAllOf</A>, <A HREF="../../../cern/colt/list/AbstractList.html#beforeInsertAllOf(int, java.util.Collection)">beforeInsertAllOf</A>, <A HREF="../../../cern/colt/list/AbstractList.html#clear()">clear</A>, <A HREF="../../../cern/colt/list/AbstractList.html#mergeSort()">mergeSort</A>, <A HREF="../../../cern/colt/list/AbstractList.html#quickSort()">quickSort</A>, <A HREF="../../../cern/colt/list/AbstractList.html#remove(int)">remove</A>, <A HREF="../../../cern/colt/list/AbstractList.html#setSize(int)">setSize</A>, <A HREF="../../../cern/colt/list/AbstractList.html#shuffle()">shuffle</A>, <A HREF="../../../cern/colt/list/AbstractList.html#sort()">sort</A></CODE></TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_cern.colt.list.AbstractCollection"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class cern.colt.list.<A HREF="../../../cern/colt/list/AbstractCollection.html" title="class in cern.colt.list">AbstractCollection</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../cern/colt/list/AbstractCollection.html#isEmpty()">isEmpty</A></CODE></TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
</TR>
</TABLE>
<P>
<!-- ============ FIELD DETAIL =========== -->
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="ShortArrayList()"><!-- --></A><H3>
ShortArrayList</H3>
<PRE>
public <B>ShortArrayList</B>()</PRE>
<DL>
<DD>Constructs an empty list.
<P>
</DL>
<HR>
<A NAME="ShortArrayList(short[])"><!-- --></A><H3>
ShortArrayList</H3>
<PRE>
public <B>ShortArrayList</B>(short[] elements)</PRE>
<DL>
<DD>Constructs a list containing the specified elements.
The initial size and capacity of the list is the length of the array.
<b>WARNING:</b> For efficiency reasons and to keep memory usage low, <b>the array is not copied</b>.
So if subsequently you modify the specified array directly via the [] operator, be sure you know what you're doing.
<P>
<DT><B>Parameters:</B><DD><CODE>elements</CODE> - the array to be backed by the the constructed list</DL>
<HR>
<A NAME="ShortArrayList(int)"><!-- --></A><H3>
ShortArrayList</H3>
<PRE>
public <B>ShortArrayList</B>(int initialCapacity)</PRE>
<DL>
<DD>Constructs an empty list with the specified initial capacity.
<P>
<DT><B>Parameters:</B><DD><CODE>initialCapacity</CODE> - the number of elements the receiver can hold without auto-expanding itself by allocating new internal memory.</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="add(short)"><!-- --></A><H3>
add</H3>
<PRE>
public void <B>add</B>(short element)</PRE>
<DL>
<DD>Appends the specified element to the end of this list.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../cern/colt/list/AbstractShortList.html#add(short)">add</A></CODE> in class <CODE><A HREF="../../../cern/colt/list/AbstractShortList.html" title="class in cern.colt.list">AbstractShortList</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>element</CODE> - element to be appended to this list.</DL>
</DD>
</DL>
<HR>
<A NAME="beforeInsert(int, short)"><!-- --></A><H3>
beforeInsert</H3>
<PRE>
public void <B>beforeInsert</B>(int index,
short element)</PRE>
<DL>
<DD>Inserts the specified element before the specified position into the receiver.
Shifts the element currently at that position (if any) and
any subsequent elements to the right.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../cern/colt/list/AbstractShortList.html#beforeInsert(int, short)">beforeInsert</A></CODE> in class <CODE><A HREF="../../../cern/colt/list/AbstractShortList.html" title="class in cern.colt.list">AbstractShortList</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>index</CODE> - index before which the specified element is to be inserted (must be in [0,size]).<DD><CODE>element</CODE> - element to be inserted.
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang">IndexOutOfBoundsException</A></CODE> - index is out of range (<tt>index < 0 || index > size()</tt>).</DL>
</DD>
</DL>
<HR>
<A NAME="binarySearchFromTo(short, int, int)"><!-- --></A><H3>
binarySearchFromTo</H3>
<PRE>
public int <B>binarySearchFromTo</B>(short key,
int from,
int to)</PRE>
<DL>
<DD>Searches the receiver for the specified value using
the binary search algorithm. The receiver must <strong>must</strong> be
sorted (as by the sort method) prior to making this call. If
it is not sorted, the results are undefined: in particular, the call
may enter an infinite loop. If the receiver contains multiple elements
equal to the specified object, there is no guarantee which instance
will be found.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../cern/colt/list/AbstractShortList.html#binarySearchFromTo(short, int, int)">binarySearchFromTo</A></CODE> in class <CODE><A HREF="../../../cern/colt/list/AbstractShortList.html" title="class in cern.colt.list">AbstractShortList</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - the value to be searched for.<DD><CODE>from</CODE> - the leftmost search position, inclusive.<DD><CODE>to</CODE> - the rightmost search position, inclusive.
<DT><B>Returns:</B><DD>index of the search key, if it is contained in the receiver;
otherwise, <tt>(-(<i>insertion point</i>) - 1)</tt>. The <i>insertion
point</i> is defined as the the point at which the value would
be inserted into the receiver: the index of the first
element greater than the key, or <tt>receiver.size()</tt>, if all
elements in the receiver are less than the specified key. Note
that this guarantees that the return value will be >= 0 if
and only if the key is found.<DT><B>See Also:</B><DD><A HREF="../../../cern/colt/Sorting.html" title="class in cern.colt"><CODE>Sorting</CODE></A>,
<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Arrays.html" title="class or interface in java.util"><CODE>Arrays</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="clone()"><!-- --></A><H3>
clone</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> <B>clone</B>()</PRE>
<DL>
<DD>Returns a deep copy of the receiver.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../cern/colt/list/AbstractShortList.html#clone()">clone</A></CODE> in class <CODE><A HREF="../../../cern/colt/list/AbstractShortList.html" title="class in cern.colt.list">AbstractShortList</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>a deep copy of the receiver.</DL>
</DD>
</DL>
<HR>
<A NAME="copy()"><!-- --></A><H3>
copy</H3>
<PRE>
public <A HREF="../../../cern/colt/list/ShortArrayList.html" title="class in cern.colt.list">ShortArrayList</A> <B>copy</B>()</PRE>
<DL>
<DD>Returns a deep copy of the receiver; uses <code>clone()</code> and casts the result.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>a deep copy of the receiver.</DL>
</DD>
</DL>
<HR>
<A NAME="elements()"><!-- --></A><H3>
elements</H3>
<PRE>
public short[] <B>elements</B>()</PRE>
<DL>
<DD>Returns the elements currently stored, including invalid elements between size and capacity, if any.
<b>WARNING:</b> For efficiency reasons and to keep memory usage low, <b>the array is not copied</b>.
So if subsequently you modify the returned array directly via the [] operator, be sure you know what you're doing.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../cern/colt/list/AbstractShortList.html#elements()">elements</A></CODE> in class <CODE><A HREF="../../../cern/colt/list/AbstractShortList.html" title="class in cern.colt.list">AbstractShortList</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the elements currently stored.</DL>
</DD>
</DL>
<HR>
<A NAME="elements(short[])"><!-- --></A><H3>
elements</H3>
<PRE>
public <A HREF="../../../cern/colt/list/AbstractShortList.html" title="class in cern.colt.list">AbstractShortList</A> <B>elements</B>(short[] elements)</PRE>
<DL>
<DD>Sets the receiver's elements to be the specified array (not a copy of it).
The size and capacity of the list is the length of the array.
<b>WARNING:</b> For efficiency reasons and to keep memory usage low, <b>the array is not copied</b>.
So if subsequently you modify the specified array directly via the [] operator, be sure you know what you're doing.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../cern/colt/list/AbstractShortList.html#elements(short[])">elements</A></CODE> in class <CODE><A HREF="../../../cern/colt/list/AbstractShortList.html" title="class in cern.colt.list">AbstractShortList</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>elements</CODE> - the new elements to be stored.
<DT><B>Returns:</B><DD>the receiver itself.</DL>
</DD>
</DL>
<HR>
<A NAME="ensureCapacity(int)"><!-- --></A><H3>
ensureCapacity</H3>
<PRE>
public void <B>ensureCapacity</B>(int minCapacity)</PRE>
<DL>
<DD>Ensures that the receiver can hold at least the specified number of elements without needing to allocate new internal memory.
If necessary, allocates new internal memory and increases the capacity of the receiver.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../cern/colt/list/AbstractShortList.html#ensureCapacity(int)">ensureCapacity</A></CODE> in class <CODE><A HREF="../../../cern/colt/list/AbstractShortList.html" title="class in cern.colt.list">AbstractShortList</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>minCapacity</CODE> - the desired minimum capacity.</DL>
</DD>
</DL>
<HR>
<A NAME="equals(java.lang.Object)"><!-- --></A><H3>
equals</H3>
<PRE>
public boolean <B>equals</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> otherObj)</PRE>
<DL>
<DD>Compares the specified Object with the receiver.
Returns true if and only if the specified Object is also an ArrayList of the same type, both Lists have the
same size, and all corresponding pairs of elements in the two Lists are identical.
In other words, two Lists are defined to be equal if they contain the
same elements in the same order.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../cern/colt/list/AbstractShortList.html#equals(java.lang.Object)">equals</A></CODE> in class <CODE><A HREF="../../../cern/colt/list/AbstractShortList.html" title="class in cern.colt.list">AbstractShortList</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>otherObj</CODE> - the Object to be compared for equality with the receiver.
<DT><B>Returns:</B><DD>true if the specified Object is equal to the receiver.</DL>
</DD>
</DL>
<HR>
<A NAME="forEach(cern.colt.function.ShortProcedure)"><!-- --></A><H3>
forEach</H3>
<PRE>
public boolean <B>forEach</B>(<A HREF="../../../cern/colt/function/ShortProcedure.html" title="interface in cern.colt.function">ShortProcedure</A> procedure)</PRE>
<DL>
<DD>Applies a procedure to each element of the receiver, if any.
Starts at index 0, moving rightwards.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../cern/colt/list/AbstractShortList.html#forEach(cern.colt.function.ShortProcedure)">forEach</A></CODE> in class <CODE><A HREF="../../../cern/colt/list/AbstractShortList.html" title="class in cern.colt.list">AbstractShortList</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>procedure</CODE> - the procedure to be applied. Stops iteration if the procedure returns <tt>false</tt>, otherwise continues.
<DT><B>Returns:</B><DD><tt>false</tt> if the procedure stopped before all elements where iterated over, <tt>true</tt> otherwise.</DL>
</DD>
</DL>
<HR>
<A NAME="get(int)"><!-- --></A><H3>
get</H3>
<PRE>
public short <B>get</B>(int index)</PRE>
<DL>
<DD>Returns the element at the specified position in the receiver.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../cern/colt/list/AbstractShortList.html#get(int)">get</A></CODE> in class <CODE><A HREF="../../../cern/colt/list/AbstractShortList.html" title="class in cern.colt.list">AbstractShortList</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>index</CODE> - index of element to return.
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang">IndexOutOfBoundsException</A></CODE> - index is out of range (index
< 0 || index >= size()).</DL>
</DD>
</DL>
<HR>
<A NAME="getQuick(int)"><!-- --></A><H3>
getQuick</H3>
<PRE>
public short <B>getQuick</B>(int index)</PRE>
<DL>
<DD>Returns the element at the specified position in the receiver; <b>WARNING:</b> Does not check preconditions.
Provided with invalid parameters this method may return invalid elements without throwing any exception!
<b>You should only use this method when you are absolutely sure that the index is within bounds.</b>
Precondition (unchecked): <tt>index >= 0 && index < size()</tt>.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>index</CODE> - index of element to return.</DL>
</DD>
</DL>
<HR>
<A NAME="indexOfFromTo(short, int, int)"><!-- --></A><H3>
indexOfFromTo</H3>
<PRE>
public int <B>indexOfFromTo</B>(short element,
int from,
int to)</PRE>
<DL>
<DD>Returns the index of the first occurrence of the specified
element. Returns <code>-1</code> if the receiver does not contain this element.
Searches between <code>from</code>, inclusive and <code>to</code>, inclusive.
Tests for identity.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../cern/colt/list/AbstractShortList.html#indexOfFromTo(short, int, int)">indexOfFromTo</A></CODE> in class <CODE><A HREF="../../../cern/colt/list/AbstractShortList.html" title="class in cern.colt.list">AbstractShortList</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>element</CODE> - element to search for.<DD><CODE>from</CODE> - the leftmost search position, inclusive.<DD><CODE>to</CODE> - the rightmost search position, inclusive.
<DT><B>Returns:</B><DD>the index of the first occurrence of the element in the receiver; returns <code>-1</code> if the element is not found.
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang">IndexOutOfBoundsException</A></CODE> - index is out of range (<tt>size()>0 && (from<0 || from>to || to>=size())</tt>).</DL>
</DD>
</DL>
<HR>
<A NAME="lastIndexOfFromTo(short, int, int)"><!-- --></A><H3>
lastIndexOfFromTo</H3>
<PRE>
public int <B>lastIndexOfFromTo</B>(short element,
int from,
int to)</PRE>
<DL>
<DD>Returns the index of the last occurrence of the specified
element. Returns <code>-1</code> if the receiver does not contain this element.
Searches beginning at <code>to</code>, inclusive until <code>from</code>, inclusive.
Tests for identity.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../cern/colt/list/AbstractShortList.html#lastIndexOfFromTo(short, int, int)">lastIndexOfFromTo</A></CODE> in class <CODE><A HREF="../../../cern/colt/list/AbstractShortList.html" title="class in cern.colt.list">AbstractShortList</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>element</CODE> - element to search for.<DD><CODE>from</CODE> - the leftmost search position, inclusive.<DD><CODE>to</CODE> - the rightmost search position, inclusive.
<DT><B>Returns:</B><DD>the index of the last occurrence of the element in the receiver; returns <code>-1</code> if the element is not found.
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang">IndexOutOfBoundsException</A></CODE> - index is out of range (<tt>size()>0 && (from<0 || from>to || to>=size())</tt>).</DL>
</DD>
</DL>
<HR>
<A NAME="partFromTo(int, int)"><!-- --></A><H3>
partFromTo</H3>
<PRE>
public <A HREF="../../../cern/colt/list/AbstractShortList.html" title="class in cern.colt.list">AbstractShortList</A> <B>partFromTo</B>(int from,
int to)</PRE>
<DL>
<DD>Returns a new list of the part of the receiver between <code>from</code>, inclusive, and <code>to</code>, inclusive.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../cern/colt/list/AbstractShortList.html#partFromTo(int, int)">partFromTo</A></CODE> in class <CODE><A HREF="../../../cern/colt/list/AbstractShortList.html" title="class in cern.colt.list">AbstractShortList</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>from</CODE> - the index of the first element (inclusive).<DD><CODE>to</CODE> - the index of the last element (inclusive).
<DT><B>Returns:</B><DD>a new list
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang">IndexOutOfBoundsException</A></CODE> - index is out of range (<tt>size()>0 && (from<0 || from>to || to>=size())</tt>).</DL>
</DD>
</DL>
<HR>
<A NAME="removeAll(cern.colt.list.AbstractShortList)"><!-- --></A><H3>
removeAll</H3>
<PRE>
public boolean <B>removeAll</B>(<A HREF="../../../cern/colt/list/AbstractShortList.html" title="class in cern.colt.list">AbstractShortList</A> other)</PRE>
<DL>
<DD>Removes from the receiver all elements that are contained in the specified list.
Tests for identity.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../cern/colt/list/AbstractShortList.html#removeAll(cern.colt.list.AbstractShortList)">removeAll</A></CODE> in class <CODE><A HREF="../../../cern/colt/list/AbstractShortList.html" title="class in cern.colt.list">AbstractShortList</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>other</CODE> - the other list.
<DT><B>Returns:</B><DD><code>true</code> if the receiver changed as a result of the call.</DL>
</DD>
</DL>
<HR>
<A NAME="replaceFromToWithFrom(int, int, cern.colt.list.AbstractShortList, int)"><!-- --></A><H3>
replaceFromToWithFrom</H3>
<PRE>
public void <B>replaceFromToWithFrom</B>(int from,
int to,
<A HREF="../../../cern/colt/list/AbstractShortList.html" title="class in cern.colt.list">AbstractShortList</A> other,
int otherFrom)</PRE>
<DL>
<DD>Replaces a number of elements in the receiver with the same number of elements of another list.
Replaces elements in the receiver, between <code>from</code> (inclusive) and <code>to</code> (inclusive),
with elements of <code>other</code>, starting from <code>otherFrom</code> (inclusive).
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../cern/colt/list/AbstractShortList.html#replaceFromToWithFrom(int, int, cern.colt.list.AbstractShortList, int)">replaceFromToWithFrom</A></CODE> in class <CODE><A HREF="../../../cern/colt/list/AbstractShortList.html" title="class in cern.colt.list">AbstractShortList</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>from</CODE> - the position of the first element to be replaced in the receiver<DD><CODE>to</CODE> - the position of the last element to be replaced in the receiver<DD><CODE>other</CODE> - list holding elements to be copied into the receiver.<DD><CODE>otherFrom</CODE> - position of first element within other list to be copied.</DL>
</DD>
</DL>
<HR>
<A NAME="retainAll(cern.colt.list.AbstractShortList)"><!-- --></A><H3>
retainAll</H3>
<PRE>
public boolean <B>retainAll</B>(<A HREF="../../../cern/colt/list/AbstractShortList.html" title="class in cern.colt.list">AbstractShortList</A> other)</PRE>
<DL>
<DD>Retains (keeps) only the elements in the receiver that are contained in the specified other list.
In other words, removes from the receiver all of its elements that are not contained in the
specified other list.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../cern/colt/list/AbstractShortList.html#retainAll(cern.colt.list.AbstractShortList)">retainAll</A></CODE> in class <CODE><A HREF="../../../cern/colt/list/AbstractShortList.html" title="class in cern.colt.list">AbstractShortList</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>other</CODE> - the other list to test against.
<DT><B>Returns:</B><DD><code>true</code> if the receiver changed as a result of the call.</DL>
</DD>
</DL>
<HR>
<A NAME="reverse()"><!-- --></A><H3>
reverse</H3>
<PRE>
public void <B>reverse</B>()</PRE>
<DL>
<DD>Reverses the elements of the receiver.
Last becomes first, second last becomes second first, and so on.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../cern/colt/list/AbstractShortList.html#reverse()">reverse</A></CODE> in class <CODE><A HREF="../../../cern/colt/list/AbstractShortList.html" title="class in cern.colt.list">AbstractShortList</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="set(int, short)"><!-- --></A><H3>
set</H3>
<PRE>
public void <B>set</B>(int index,
short element)</PRE>
<DL>
<DD>Replaces the element at the specified position in the receiver with the specified element.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../cern/colt/list/AbstractShortList.html#set(int, short)">set</A></CODE> in class <CODE><A HREF="../../../cern/colt/list/AbstractShortList.html" title="class in cern.colt.list">AbstractShortList</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>index</CODE> - index of element to replace.<DD><CODE>element</CODE> - element to be stored at the specified position.
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang">IndexOutOfBoundsException</A></CODE> - index is out of range (index
< 0 || index >= size()).</DL>
</DD>
</DL>
<HR>
<A NAME="setQuick(int, short)"><!-- --></A><H3>
setQuick</H3>
<PRE>
public void <B>setQuick</B>(int index,
short element)</PRE>
<DL>
<DD>Replaces the element at the specified position in the receiver with the specified element; <b>WARNING:</b> Does not check preconditions.
Provided with invalid parameters this method may access invalid indexes without throwing any exception!
<b>You should only use this method when you are absolutely sure that the index is within bounds.</b>
Precondition (unchecked): <tt>index >= 0 && index < size()</tt>.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>index</CODE> - index of element to replace.<DD><CODE>element</CODE> - element to be stored at the specified position.</DL>
</DD>
</DL>
<HR>
<A NAME="shuffleFromTo(int, int)"><!-- --></A><H3>
shuffleFromTo</H3>
<PRE>
public void <B>shuffleFromTo</B>(int from,
int to)</PRE>
<DL>
<DD>Randomly permutes the part of the receiver between <code>from</code> (inclusive) and <code>to</code> (inclusive).
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../cern/colt/list/AbstractShortList.html#shuffleFromTo(int, int)">shuffleFromTo</A></CODE> in class <CODE><A HREF="../../../cern/colt/list/AbstractShortList.html" title="class in cern.colt.list">AbstractShortList</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>from</CODE> - the index of the first element (inclusive) to be permuted.<DD><CODE>to</CODE> - the index of the last element (inclusive) to be permuted.
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang">IndexOutOfBoundsException</A></CODE> - index is out of range (<tt>size()>0 && (from<0 || from>to || to>=size())</tt>).</DL>
</DD>
</DL>
<HR>
<A NAME="sortFromTo(int, int)"><!-- --></A><H3>
sortFromTo</H3>
<PRE>
public void <B>sortFromTo</B>(int from,
int to)</PRE>
<DL>
<DD>Sorts the specified range of the receiver into ascending order.
The sorting algorithm is dynamically chosen according to the characteristics of the data set.
Currently quicksort and countsort are considered.
Countsort is not always applicable, but if applicable, it usually outperforms quicksort by a factor of 3-4.
<p>Best case performance: O(N).
<dt>Worst case performance: O(N^2) (a degenerated quicksort).
<dt>Best case space requirements: 0 KB.
<dt>Worst case space requirements: 40 KB.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../cern/colt/list/AbstractList.html#sortFromTo(int, int)">sortFromTo</A></CODE> in class <CODE><A HREF="../../../cern/colt/list/AbstractList.html" title="class in cern.colt.list">AbstractList</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>from</CODE> - the index of the first element (inclusive) to be sorted.<DD><CODE>to</CODE> - the index of the last element (inclusive) to be sorted.
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IndexOutOfBoundsException.html" title="class or interface in java.lang">IndexOutOfBoundsException</A></CODE> - index is out of range (<tt>size()>0 && (from<0 || from>to || to>=size())</tt>).</DL>
</DD>
</DL>
<HR>
<A NAME="trimToSize()"><!-- --></A><H3>
trimToSize</H3>
<PRE>
public void <B>trimToSize</B>()</PRE>
<DL>
<DD>Trims the capacity of the receiver to be the receiver's current
size. Releases any superfluos internal memory. An application can use this operation to minimize the
storage of the receiver.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../cern/colt/list/AbstractList.html#trimToSize()">trimToSize</A></CODE> in class <CODE><A HREF="../../../cern/colt/list/AbstractList.html" title="class in cern.colt.list">AbstractList</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ShortArrayList.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<b>Colt 1.2.0</b></EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../cern/colt/list/ObjectArrayList.html" title="class in cern.colt.list"><B>PREV CLASS</B></A>
<A HREF="../../../cern/colt/list/SimpleLongArrayList.html" title="class in cern.colt.list"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html" target="_top"><B>FRAMES</B></A>
<A HREF="ShortArrayList.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | <A HREF="#fields_inherited_from_class_cern.colt.PersistentObject">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
<font size=-1 >Jump to the <a target=_top href=http://dsd.lbl.gov/~hoschek/colt >Colt Homepage</a>
</BODY>
</HTML>
|