/usr/share/doc/libjsr166y-java/api/jsr166y/forkjoin/ParallelArray.html is in libjsr166y-java 0.1.20080107-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 | <!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.6.0_18) on Mon Nov 15 19:31:42 UTC 2010 -->
<TITLE>
ParallelArray
</TITLE>
<META NAME="date" CONTENT="2010-11-15">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="ParallelArray";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= 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=2 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="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-all.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>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../jsr166y/forkjoin/Ops.RelationalPredicate.html" title="interface in jsr166y.forkjoin"><B>PREV CLASS</B></A>
<A HREF="../../jsr166y/forkjoin/ParallelArray.SummaryStatistics.html" title="interface in jsr166y.forkjoin"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../index.html?jsr166y/forkjoin/ParallelArray.html" target="_top"><B>FRAMES</B></A>
<A HREF="ParallelArray.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: <A HREF="#nested_class_summary">NESTED</A> | FIELD | <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">
jsr166y.forkjoin</FONT>
<BR>
Class ParallelArray<T></H2>
<PRE>
java.lang.Object
<IMG SRC="../../resources/inherit.gif" ALT="extended by "><B>jsr166y.forkjoin.ParallelArray<T></B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD>java.lang.Iterable<T></DD>
</DL>
<HR>
<DL>
<DT><PRE>public class <B>ParallelArray<T></B><DT>extends java.lang.Object<DT>implements java.lang.Iterable<T></DL>
</PRE>
<P>
An array supporting parallel operations.
<p>A ParallelArray maintains a <A HREF="../../jsr166y/forkjoin/ForkJoinExecutor.html" title="interface in jsr166y.forkjoin"><CODE>ForkJoinExecutor</CODE></A> and an
array in order to provide parallel aggregate operations. The main
operations are to <em>apply</em> some procedure to each element, to
<em>map</em> each element to a new element, to <em>replace</em>
each element, to <em>select</em> a subset of elements based on
matching a predicate or ranges of indices, and to <em>reduce</em>
all elements into a single value such as a sum.
<p> A ParallelArray is constructed by allocating, using, or copying
an array, using one of the static factory methods <A HREF="../../jsr166y/forkjoin/ParallelArray.html#create(int, java.lang.Class, jsr166y.forkjoin.ForkJoinExecutor)"><CODE>create(int, java.lang.Class<? super T>, jsr166y.forkjoin.ForkJoinExecutor)</CODE></A>,
<A HREF="../../jsr166y/forkjoin/ParallelArray.html#createEmpty(int, java.lang.Class, jsr166y.forkjoin.ForkJoinExecutor)"><CODE>createEmpty(int, java.lang.Class<? super T>, jsr166y.forkjoin.ForkJoinExecutor)</CODE></A>, <A HREF="../../jsr166y/forkjoin/ParallelArray.html#createUsingHandoff(T[], jsr166y.forkjoin.ForkJoinExecutor)"><CODE>createUsingHandoff(T[], jsr166y.forkjoin.ForkJoinExecutor)</CODE></A> and <A HREF="../../jsr166y/forkjoin/ParallelArray.html#createFromCopy(T[], jsr166y.forkjoin.ForkJoinExecutor)"><CODE>createFromCopy(T[], jsr166y.forkjoin.ForkJoinExecutor)</CODE></A>. Upon construction, the encapsulated array managed
by the ParallelArray must not be shared between threads without
external synchronization. In particular, as is the case with any
array, access by another thread of an element of a ParallelArray
while another operation is in progress has undefined effects.
<p> The ForkJoinExecutor used to construct a ParallelArray can be
shared safely by other threads (and used in other
ParallelArrays). To avoid the overhead associated with creating
multiple executors, it is often a good idea to use the <A HREF="../../jsr166y/forkjoin/ParallelArray.html#defaultExecutor()"><CODE>defaultExecutor()</CODE></A> across all ParallelArrays. However, you might
choose to use different ones for the sake of controlling processor
usage, isolating faults, and/or ensuring progress.
<p>A ParallelArray is not a List. It relies on random access across
array elements to support efficient parallel operations. However,
a ParallelArray can be viewed and manipulated as a List, via method
<A HREF="../../jsr166y/forkjoin/ParallelArray.html#asList()"><CODE>asList()</CODE></A>. The <tt>asList</tt> view allows
incremental insertion and modification of elements while setting up
a ParallelArray, generally before using it for parallel
operations. Similarly, the list view may be useful when accessing
the results of computations in sequential contexts. A
ParallelArray may also be created using the elements of any other
Collection, by constructing from the array returned by the
Collection's <tt>toArray</tt> method. The effects of mutative
<tt>asList</tt> operations may also be achieved directly using
method <A HREF="../../jsr166y/forkjoin/ParallelArray.html#setLimit(int)"><CODE>setLimit(int)</CODE></A> along with element-by-element access
methods <A HREF="../../jsr166y/forkjoin/ParallelArray.html#get(int)"><CODE>get(int)</CODE></A></tt> and <A HREF="../../jsr166y/forkjoin/ParallelArray.html#set(int, T)"><CODE>set(int, T)</CODE></A>.
<p> Most operations can be prefixed with range bounds, filters, and
mappings using <tt>withBounds</tt>, <tt>withFilter</tt>, and
<tt>withMapping</tt>, respectively. For example,
<tt>aParallelArray.withFilter(aPredicate).all()</tt> creates a new
ParallelArray containing only those elements matching the
predicate. As illustrated below, a <em>mapping</em> often
represents accessing some field or invoking some method of an
element. These versions are typically more efficient than
performing selections, then mappings, then other operations in
multiple (parallel) steps. The basic ideas and usages of filtering
and mapping are similar to those in database query systems such as
SQL, but take a more restrictive form. Series of filter and
mapping prefixes may each be cascaded, but all filter prefixes
must precede all mapping prefixes, to ensure efficient execution in
s single parallel step. Instances of <tt>WithFilter</tt> etc are
useful only as operation prefixes, and should not normally be
stored in variables for future use.
<p>This class includes some reductions, such as <tt>min</tt>, that
are commonly useful for most element types, as well as a combined
version, <tt>summary</tt>, that computes all of them in a single
parallel step, which is normally more efficient that computing each
in turn.
<p>While ParallelArrays can be based on any kind of an object
array, including "boxed" types such as Long, parallel operations on
scalar "unboxed" type are likely to be substantially more
efficient. For this reason, classes <A HREF="../../jsr166y/forkjoin/ParallelLongArray.html" title="class in jsr166y.forkjoin"><CODE>ParallelLongArray</CODE></A>, and
<A HREF="../../jsr166y/forkjoin/ParallelDoubleArray.html" title="class in jsr166y.forkjoin"><CODE>ParallelDoubleArray</CODE></A> are also supplied, and designed to
smoothly interoperate with ParallelArrays. You should also use a
ParallelLongArray for processing other integral scalar data
(<tt>int</tt>, <tt>short</tt>, etc). And similarly use a
ParallelDoubleArray for <tt>float</tt> data. (Further
specializations for these other types would add clutter without
significantly improving performance beyond that of the Long and
Double versions.)
<p>The methods in this class are designed to perform efficiently
with both large and small pools, even with single-thread pools on
uniprocessors. However, there is some overhead in parallelizing
operations, so short computations on small arrays might not execute
faster than sequential versions, and might even be slower.
<p><b>Sample usages</b>.
The main difference between programming with plain arrays and
programming with aggregates is that you must separately define each
of the component functions on elements. For example, the following
returns the maximum Grade Point Average across all senior students,
given a (fictional) <tt>Student</tt> class:
<pre>
import static Ops.*;
class StudentStatistics {
ParallelArray<Student> students = ...
// ...
public double getMaxSeniorGpa() {
return students.withFilter(isSenior).withMapping(gpaField).max();
}
// helpers:
static final class IsSenior implements Predicate<Student> {
public boolean evaluate(Student s) { return s.credits > 90; }
}
static final IsSenior isSenior = new IsSenior();
static final class GpaField implements MapperToDouble<Student> {
public double map(Student s) { return s.gpa; }
}
static final GpaField gpaField = new GpaField();
}
</pre>
<P>
<P>
<HR>
<P>
<!-- ======== NESTED CLASS SUMMARY ======== -->
<A NAME="nested_class_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Nested Class Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static interface</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jsr166y/forkjoin/ParallelArray.SummaryStatistics.html" title="interface in jsr166y.forkjoin">ParallelArray.SummaryStatistics</A><<A HREF="../../jsr166y/forkjoin/ParallelArray.SummaryStatistics.html" title="type parameter in ParallelArray.SummaryStatistics">T</A>></B></CODE>
<BR>
Summary statistics for a possibly bounded, filtered, and/or
mapped ParallelArray.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static class</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jsr166y/forkjoin/ParallelArray.WithBounds.html" title="class in jsr166y.forkjoin">ParallelArray.WithBounds</A><<A HREF="../../jsr166y/forkjoin/ParallelArray.WithBounds.html" title="type parameter in ParallelArray.WithBounds">T</A>></B></CODE>
<BR>
A restriction of parallel array operations to apply only within
a given range of indices.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static class</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jsr166y/forkjoin/ParallelArray.WithDoubleMapping.html" title="class in jsr166y.forkjoin">ParallelArray.WithDoubleMapping</A><<A HREF="../../jsr166y/forkjoin/ParallelArray.WithDoubleMapping.html" title="type parameter in ParallelArray.WithDoubleMapping">T</A>></B></CODE>
<BR>
A modifier for parallel array operations to apply to mappings
of elements to doubles, not to the elements themselves</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static class</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jsr166y/forkjoin/ParallelArray.WithFilter.html" title="class in jsr166y.forkjoin">ParallelArray.WithFilter</A><<A HREF="../../jsr166y/forkjoin/ParallelArray.WithFilter.html" title="type parameter in ParallelArray.WithFilter">T</A>></B></CODE>
<BR>
A restriction of parallel array operations to apply only to
elements for which a selector returns true</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static class</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jsr166y/forkjoin/ParallelArray.WithLongMapping.html" title="class in jsr166y.forkjoin">ParallelArray.WithLongMapping</A><<A HREF="../../jsr166y/forkjoin/ParallelArray.WithLongMapping.html" title="type parameter in ParallelArray.WithLongMapping">T</A>></B></CODE>
<BR>
A modifier for parallel array operations to apply to mappings
of elements to longs, not to the elements themselves</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static class</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jsr166y/forkjoin/ParallelArray.WithMapping.html" title="class in jsr166y.forkjoin">ParallelArray.WithMapping</A><<A HREF="../../jsr166y/forkjoin/ParallelArray.WithMapping.html" title="type parameter in ParallelArray.WithMapping">T</A>,<A HREF="../../jsr166y/forkjoin/ParallelArray.WithMapping.html" title="type parameter in ParallelArray.WithMapping">U</A>></B></CODE>
<BR>
A modifier for parallel array operations to apply to mappings
of elements, not to the elements themselves</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">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected </CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jsr166y/forkjoin/ParallelArray.html#ParallelArray(jsr166y.forkjoin.ForkJoinExecutor, T[], int)">ParallelArray</A></B>(<A HREF="../../jsr166y/forkjoin/ForkJoinExecutor.html" title="interface in jsr166y.forkjoin">ForkJoinExecutor</A> executor,
<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>[] array,
int limit)</CODE>
<BR>
Constructor for use by subclasses to create a new ParallelArray
using the given executor, and initially using the supplied
array, with effective size bound by the given limit.</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">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</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="../../jsr166y/forkjoin/ParallelArray.html#addAll(jsr166y.forkjoin.ParallelArray.WithBounds)">addAll</A></B>(<A HREF="../../jsr166y/forkjoin/ParallelArray.WithBounds.html" title="class in jsr166y.forkjoin">ParallelArray.WithBounds</A><<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>> other)</CODE>
<BR>
Equivalent to <tt>AsList.addAll</tt> but specialized for
ParallelArray arguments and likely to be more efficient.</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="../../jsr166y/forkjoin/ParallelArray.html#addAll(jsr166y.forkjoin.ParallelArray)">addAll</A></B>(<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="class in jsr166y.forkjoin">ParallelArray</A><<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>> other)</CODE>
<BR>
Equivalent to <tt>AsList.addAll</tt> but specialized for
ParallelArray arguments and likely to be more efficient.</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="../../jsr166y/forkjoin/ParallelArray.html#addAll(T[])">addAll</A></B>(<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>[] other)</CODE>
<BR>
Equivalent to <tt>AsList.addAll</tt> but specialized for array
arguments and likely to be more efficient.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="class in jsr166y.forkjoin">ParallelArray</A><<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jsr166y/forkjoin/ParallelArray.html#all()">all</A></B>()</CODE>
<BR>
Returns a new ParallelArray holding all elements</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="class in jsr166y.forkjoin">ParallelArray</A><<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jsr166y/forkjoin/ParallelArray.html#all(java.lang.Class)">all</A></B>(java.lang.Class<? super <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>> elementType)</CODE>
<BR>
Returns a new ParallelArray with the given element type holding
all elements</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="class in jsr166y.forkjoin">ParallelArray</A><<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jsr166y/forkjoin/ParallelArray.html#allNonidenticalElements()">allNonidenticalElements</A></B>()</CODE>
<BR>
Returns a new ParallelArray containing only the non-null unique
elements of this array (that is, without any duplicates).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="class in jsr166y.forkjoin">ParallelArray</A><<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jsr166y/forkjoin/ParallelArray.html#allUniqueElements()">allUniqueElements</A></B>()</CODE>
<BR>
Returns a new ParallelArray containing only the non-null unique
elements of this array (that is, without any duplicates).</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="../../jsr166y/forkjoin/ParallelArray.html#apply(jsr166y.forkjoin.Ops.Procedure)">apply</A></B>(<A HREF="../../jsr166y/forkjoin/Ops.Procedure.html" title="interface in jsr166y.forkjoin">Ops.Procedure</A><? super <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>> procedure)</CODE>
<BR>
Applies the given procedure to elements</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.util.List<<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jsr166y/forkjoin/ParallelArray.html#asList()">asList</A></B>()</CODE>
<BR>
Returns a view of this ParallelArray as a List.</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="../../jsr166y/forkjoin/ParallelArray.html#binarySearch(T)">binarySearch</A></B>(<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A> target)</CODE>
<BR>
Assuming this array is sorted, returns the index of an element
equal to given target, or -1 if not present.</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="../../jsr166y/forkjoin/ParallelArray.html#binarySearch(T, java.util.Comparator)">binarySearch</A></B>(<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A> target,
java.util.Comparator<? super <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>> comparator)</CODE>
<BR>
Assuming this array is sorted with respect to the given
comparator, returns the index of an element equal to given
target, or -1 if not present.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR ALIGN="right" VALIGN="">
<TD NOWRAP><FONT SIZE="-1">
<CODE><U,V> <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="class in jsr166y.forkjoin">ParallelArray</A><V></CODE></FONT></TD>
</TR>
</TABLE>
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jsr166y/forkjoin/ParallelArray.html#combine(jsr166y.forkjoin.ParallelArray.WithBounds, jsr166y.forkjoin.Ops.Combiner)">combine</A></B>(<A HREF="../../jsr166y/forkjoin/ParallelArray.WithBounds.html" title="class in jsr166y.forkjoin">ParallelArray.WithBounds</A><? extends U> other,
<A HREF="../../jsr166y/forkjoin/Ops.Combiner.html" title="interface in jsr166y.forkjoin">Ops.Combiner</A><? super <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>,? super U,? extends V> combiner)</CODE>
<BR>
Returns a ParallelArray containing results of
applying <tt>combine(thisElement, otherElement)</tt>
for each element.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR ALIGN="right" VALIGN="">
<TD NOWRAP><FONT SIZE="-1">
<CODE><U,V> <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="class in jsr166y.forkjoin">ParallelArray</A><V></CODE></FONT></TD>
</TR>
</TABLE>
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jsr166y/forkjoin/ParallelArray.html#combine(jsr166y.forkjoin.ParallelArray.WithBounds, jsr166y.forkjoin.Ops.Combiner, java.lang.Class)">combine</A></B>(<A HREF="../../jsr166y/forkjoin/ParallelArray.WithBounds.html" title="class in jsr166y.forkjoin">ParallelArray.WithBounds</A><? extends U> other,
<A HREF="../../jsr166y/forkjoin/Ops.Combiner.html" title="interface in jsr166y.forkjoin">Ops.Combiner</A><? super <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>,? super U,? extends V> combiner,
java.lang.Class<? super V> elementType)</CODE>
<BR>
Returns a ParallelArray containing results of
applying <tt>combine(thisElement, otherElement)</tt>
for each element.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR ALIGN="right" VALIGN="">
<TD NOWRAP><FONT SIZE="-1">
<CODE><U,V> <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="class in jsr166y.forkjoin">ParallelArray</A><V></CODE></FONT></TD>
</TR>
</TABLE>
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jsr166y/forkjoin/ParallelArray.html#combine(jsr166y.forkjoin.ParallelArray, jsr166y.forkjoin.Ops.Combiner)">combine</A></B>(<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="class in jsr166y.forkjoin">ParallelArray</A><? extends U> other,
<A HREF="../../jsr166y/forkjoin/Ops.Combiner.html" title="interface in jsr166y.forkjoin">Ops.Combiner</A><? super <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>,? super U,? extends V> combiner)</CODE>
<BR>
Returns a ParallelArray containing results of
applying <tt>combine(thisElement, otherElement)</tt>
for each element.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR ALIGN="right" VALIGN="">
<TD NOWRAP><FONT SIZE="-1">
<CODE><U,V> <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="class in jsr166y.forkjoin">ParallelArray</A><V></CODE></FONT></TD>
</TR>
</TABLE>
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jsr166y/forkjoin/ParallelArray.html#combine(jsr166y.forkjoin.ParallelArray, jsr166y.forkjoin.Ops.Combiner, java.lang.Class)">combine</A></B>(<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="class in jsr166y.forkjoin">ParallelArray</A><? extends U> other,
<A HREF="../../jsr166y/forkjoin/Ops.Combiner.html" title="interface in jsr166y.forkjoin">Ops.Combiner</A><? super <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>,? super U,? extends V> combiner,
java.lang.Class<? super V> elementType)</CODE>
<BR>
Returns a ParallelArray containing results of
applying <tt>combine(thisElement, otherElement)</tt>
for each element.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR ALIGN="right" VALIGN="">
<TD NOWRAP><FONT SIZE="-1">
<CODE><U,V> <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="class in jsr166y.forkjoin">ParallelArray</A><V></CODE></FONT></TD>
</TR>
</TABLE>
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jsr166y/forkjoin/ParallelArray.html#combine(U[], jsr166y.forkjoin.Ops.Combiner)">combine</A></B>(U[] other,
<A HREF="../../jsr166y/forkjoin/Ops.Combiner.html" title="interface in jsr166y.forkjoin">Ops.Combiner</A><? super <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>,? super U,? extends V> combiner)</CODE>
<BR>
Returns a ParallelArray containing results of
applying <tt>combine(thisElement, otherElement)</tt>
for each element.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR ALIGN="right" VALIGN="">
<TD NOWRAP><FONT SIZE="-1">
<CODE><U,V> <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="class in jsr166y.forkjoin">ParallelArray</A><V></CODE></FONT></TD>
</TR>
</TABLE>
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jsr166y/forkjoin/ParallelArray.html#combine(U[], jsr166y.forkjoin.Ops.Combiner, java.lang.Class)">combine</A></B>(U[] other,
<A HREF="../../jsr166y/forkjoin/Ops.Combiner.html" title="interface in jsr166y.forkjoin">Ops.Combiner</A><? super <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>,? super U,? extends V> combiner,
java.lang.Class<? super V> elementType)</CODE>
<BR>
Returns a ParallelArray containing results of
applying <tt>combine(thisElement, otherElement)</tt>
for each element.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR ALIGN="right" VALIGN="">
<TD NOWRAP><FONT SIZE="-1">
<CODE><T> <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="class in jsr166y.forkjoin">ParallelArray</A><T></CODE></FONT></TD>
</TR>
</TABLE>
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jsr166y/forkjoin/ParallelArray.html#create(int, java.lang.Class, jsr166y.forkjoin.ForkJoinExecutor)">create</A></B>(int size,
java.lang.Class<? super T> elementType,
<A HREF="../../jsr166y/forkjoin/ForkJoinExecutor.html" title="interface in jsr166y.forkjoin">ForkJoinExecutor</A> executor)</CODE>
<BR>
Creates a new ParallelArray using the given executor and
an array of the given size constructed using the
indicated base element type.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR ALIGN="right" VALIGN="">
<TD NOWRAP><FONT SIZE="-1">
<CODE><T> <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="class in jsr166y.forkjoin">ParallelArray</A><T></CODE></FONT></TD>
</TR>
</TABLE>
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jsr166y/forkjoin/ParallelArray.html#createEmpty(int, java.lang.Class, jsr166y.forkjoin.ForkJoinExecutor)">createEmpty</A></B>(int size,
java.lang.Class<? super T> elementType,
<A HREF="../../jsr166y/forkjoin/ForkJoinExecutor.html" title="interface in jsr166y.forkjoin">ForkJoinExecutor</A> executor)</CODE>
<BR>
Creates a new ParallelArray using the given executor and an
array of the given size constructed using the indicated base
element type, but with an initial effective size of zero,
enabling incremental insertion via <A HREF="../../jsr166y/forkjoin/ParallelArray.html#asList()"><CODE>asList()</CODE></A>
operations.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR ALIGN="right" VALIGN="">
<TD NOWRAP><FONT SIZE="-1">
<CODE><T> <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="class in jsr166y.forkjoin">ParallelArray</A><T></CODE></FONT></TD>
</TR>
</TABLE>
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jsr166y/forkjoin/ParallelArray.html#createFromCopy(int, T[], jsr166y.forkjoin.ForkJoinExecutor)">createFromCopy</A></B>(int size,
T[] source,
<A HREF="../../jsr166y/forkjoin/ForkJoinExecutor.html" title="interface in jsr166y.forkjoin">ForkJoinExecutor</A> executor)</CODE>
<BR>
Creates a new ParallelArray using an array of the given size,
initially holding copies of the given source truncated or
padded with nulls to obtain the specified length.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR ALIGN="right" VALIGN="">
<TD NOWRAP><FONT SIZE="-1">
<CODE><T> <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="class in jsr166y.forkjoin">ParallelArray</A><T></CODE></FONT></TD>
</TR>
</TABLE>
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jsr166y/forkjoin/ParallelArray.html#createFromCopy(T[], jsr166y.forkjoin.ForkJoinExecutor)">createFromCopy</A></B>(T[] source,
<A HREF="../../jsr166y/forkjoin/ForkJoinExecutor.html" title="interface in jsr166y.forkjoin">ForkJoinExecutor</A> executor)</CODE>
<BR>
Creates a new ParallelArray using the given executor and
initially holding copies of the given
source elements.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR ALIGN="right" VALIGN="">
<TD NOWRAP><FONT SIZE="-1">
<CODE><T> <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="class in jsr166y.forkjoin">ParallelArray</A><T></CODE></FONT></TD>
</TR>
</TABLE>
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jsr166y/forkjoin/ParallelArray.html#createUsingHandoff(T[], jsr166y.forkjoin.ForkJoinExecutor)">createUsingHandoff</A></B>(T[] handoff,
<A HREF="../../jsr166y/forkjoin/ForkJoinExecutor.html" title="interface in jsr166y.forkjoin">ForkJoinExecutor</A> executor)</CODE>
<BR>
Creates a new ParallelArray initially using the given array and
executor.</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="../../jsr166y/forkjoin/ParallelArray.html#cumulate(jsr166y.forkjoin.Ops.Reducer, T)">cumulate</A></B>(<A HREF="../../jsr166y/forkjoin/Ops.Reducer.html" title="interface in jsr166y.forkjoin">Ops.Reducer</A><<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>> reducer,
<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A> base)</CODE>
<BR>
Replaces each element with the running cumulation of applying
the given reducer.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static <A HREF="../../jsr166y/forkjoin/ForkJoinExecutor.html" title="interface in jsr166y.forkjoin">ForkJoinExecutor</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jsr166y/forkjoin/ParallelArray.html#defaultExecutor()">defaultExecutor</A></B>()</CODE>
<BR>
Returns a common default executor for use in ParallelArrays.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jsr166y/forkjoin/ParallelArray.html#get(int)">get</A></B>(int i)</CODE>
<BR>
Returns the element of the array at the given index</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jsr166y/forkjoin/ParallelArray.html#getArray()">getArray</A></B>()</CODE>
<BR>
Returns the underlying array used for computations</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../jsr166y/forkjoin/ForkJoinExecutor.html" title="interface in jsr166y.forkjoin">ForkJoinExecutor</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jsr166y/forkjoin/ParallelArray.html#getExecutor()">getExecutor</A></B>()</CODE>
<BR>
Returns the executor used for computations</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="../../jsr166y/forkjoin/ParallelArray.html#indexOf(T)">indexOf</A></B>(<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A> target)</CODE>
<BR>
Returns the index of some element equal to given target,
or -1 if not present</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.util.Iterator<<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jsr166y/forkjoin/ParallelArray.html#iterator()">iterator</A></B>()</CODE>
<BR>
Returns an iterator stepping through each element of the array
up to the current limit.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jsr166y/forkjoin/ParallelArray.html#max()">max</A></B>()</CODE>
<BR>
Returns the maximum element, or null if empty
assuming that all elements are Comparables</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jsr166y/forkjoin/ParallelArray.html#max(java.util.Comparator)">max</A></B>(java.util.Comparator<? super <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>> comparator)</CODE>
<BR>
Returns the maximum element, or null if empty</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jsr166y/forkjoin/ParallelArray.html#min()">min</A></B>()</CODE>
<BR>
Returns the minimum element, or null if empty,
assuming that all elements are Comparables</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jsr166y/forkjoin/ParallelArray.html#min(java.util.Comparator)">min</A></B>(java.util.Comparator<? super <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>> comparator)</CODE>
<BR>
Returns the minimum element, or null if empty</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jsr166y/forkjoin/ParallelArray.html#precumulate(jsr166y.forkjoin.Ops.Reducer, T)">precumulate</A></B>(<A HREF="../../jsr166y/forkjoin/Ops.Reducer.html" title="interface in jsr166y.forkjoin">Ops.Reducer</A><<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>> reducer,
<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A> base)</CODE>
<BR>
Replaces each element with the cumulation of applying the given
reducer to all previous values, and returns the total
reduction.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jsr166y/forkjoin/ParallelArray.html#reduce(jsr166y.forkjoin.Ops.Reducer, T)">reduce</A></B>(<A HREF="../../jsr166y/forkjoin/Ops.Reducer.html" title="interface in jsr166y.forkjoin">Ops.Reducer</A><<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>> reducer,
<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A> base)</CODE>
<BR>
Returns reduction of elements</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="../../jsr166y/forkjoin/ParallelArray.html#removeConsecutiveDuplicates()">removeConsecutiveDuplicates</A></B>()</CODE>
<BR>
Removes consecutive elements that are equal (or null), shifting
others leftward, and possibly decreasing size.</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="../../jsr166y/forkjoin/ParallelArray.html#removeNulls()">removeNulls</A></B>()</CODE>
<BR>
Removes null elements, shifting others leftward, and possibly
decreasing size.</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="../../jsr166y/forkjoin/ParallelArray.html#replaceWithCombination(jsr166y.forkjoin.ParallelArray.WithBounds, jsr166y.forkjoin.Ops.Reducer)">replaceWithCombination</A></B>(<A HREF="../../jsr166y/forkjoin/ParallelArray.WithBounds.html" title="class in jsr166y.forkjoin">ParallelArray.WithBounds</A><? extends <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>> other,
<A HREF="../../jsr166y/forkjoin/Ops.Reducer.html" title="interface in jsr166y.forkjoin">Ops.Reducer</A><<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>> combiner)</CODE>
<BR>
Replaces elements with results of applying
<tt>combine(thisElement, otherElement)</tt></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="../../jsr166y/forkjoin/ParallelArray.html#replaceWithCombination(jsr166y.forkjoin.ParallelArray, jsr166y.forkjoin.Ops.Reducer)">replaceWithCombination</A></B>(<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="class in jsr166y.forkjoin">ParallelArray</A><? extends <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>> other,
<A HREF="../../jsr166y/forkjoin/Ops.Reducer.html" title="interface in jsr166y.forkjoin">Ops.Reducer</A><<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>> combiner)</CODE>
<BR>
Replaces elements with results of applying
<tt>combine(thisElement, otherElement)</tt></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="../../jsr166y/forkjoin/ParallelArray.html#replaceWithCombination(T[], jsr166y.forkjoin.Ops.Reducer)">replaceWithCombination</A></B>(<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>[] other,
<A HREF="../../jsr166y/forkjoin/Ops.Reducer.html" title="interface in jsr166y.forkjoin">Ops.Reducer</A><<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>> combiner)</CODE>
<BR>
Replaces elements with results of applying
<tt>combine(thisElement, otherElement)</tt></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="../../jsr166y/forkjoin/ParallelArray.html#replaceWithGeneratedValue(jsr166y.forkjoin.Ops.Generator)">replaceWithGeneratedValue</A></B>(<A HREF="../../jsr166y/forkjoin/Ops.Generator.html" title="interface in jsr166y.forkjoin">Ops.Generator</A><? extends <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>> generator)</CODE>
<BR>
Replaces elements with the results of applying the given
generator.</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="../../jsr166y/forkjoin/ParallelArray.html#replaceWithMappedIndex(jsr166y.forkjoin.Ops.MapperFromInt)">replaceWithMappedIndex</A></B>(<A HREF="../../jsr166y/forkjoin/Ops.MapperFromInt.html" title="interface in jsr166y.forkjoin">Ops.MapperFromInt</A><? extends <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>> mapper)</CODE>
<BR>
Replaces elements with the results of applying the given
mapper to their indices.</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="../../jsr166y/forkjoin/ParallelArray.html#replaceWithTransform(jsr166y.forkjoin.Ops.Mapper)">replaceWithTransform</A></B>(<A HREF="../../jsr166y/forkjoin/Ops.Mapper.html" title="interface in jsr166y.forkjoin">Ops.Mapper</A><? super <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>,? extends <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>> mapper)</CODE>
<BR>
Replaces elements with the results of applying the given mapper
to their current values.</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="../../jsr166y/forkjoin/ParallelArray.html#replaceWithValue(T)">replaceWithValue</A></B>(<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A> value)</CODE>
<BR>
Replaces elements with the given value.</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="../../jsr166y/forkjoin/ParallelArray.html#set(int, T)">set</A></B>(int i,
<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A> x)</CODE>
<BR>
Sets the element of the array at the given index to the given value</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="../../jsr166y/forkjoin/ParallelArray.html#setLimit(int)">setLimit</A></B>(int newLimit)</CODE>
<BR>
Ensures that the underlying array can be accessed up to the
given upper bound, reallocating and copying the underlying
array to expand if necessary.</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="../../jsr166y/forkjoin/ParallelArray.html#size()">size</A></B>()</CODE>
<BR>
Returns the effective size of the underlying array.</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="../../jsr166y/forkjoin/ParallelArray.html#sort()">sort</A></B>()</CODE>
<BR>
Sorts the array, assuming all elements are Comparable.</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="../../jsr166y/forkjoin/ParallelArray.html#sort(java.util.Comparator)">sort</A></B>(java.util.Comparator<? super <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>> comparator)</CODE>
<BR>
Sorts the array.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../jsr166y/forkjoin/ParallelArray.SummaryStatistics.html" title="interface in jsr166y.forkjoin">ParallelArray.SummaryStatistics</A><<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jsr166y/forkjoin/ParallelArray.html#summary()">summary</A></B>()</CODE>
<BR>
Returns summary statistics, assuming that all elements are
Comparables</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../jsr166y/forkjoin/ParallelArray.SummaryStatistics.html" title="interface in jsr166y.forkjoin">ParallelArray.SummaryStatistics</A><<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jsr166y/forkjoin/ParallelArray.html#summary(java.util.Comparator)">summary</A></B>(java.util.Comparator<? super <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>> comparator)</CODE>
<BR>
Returns summary statistics, using the given comparator
to locate minimum and maximum elements.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jsr166y/forkjoin/ParallelArray.html#toString()">toString</A></B>()</CODE>
<BR>
Equivalent to <tt>asList().toString()</tt></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../jsr166y/forkjoin/ParallelArray.WithBounds.html" title="class in jsr166y.forkjoin">ParallelArray.WithBounds</A><<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jsr166y/forkjoin/ParallelArray.html#withBounds(int, int)">withBounds</A></B>(int firstIndex,
int upperBound)</CODE>
<BR>
Returns an operation prefix that causes a method to
operate only on the elements of the array between
firstIndex (inclusive) and upperBound (exclusive).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../jsr166y/forkjoin/ParallelArray.WithFilter.html" title="class in jsr166y.forkjoin">ParallelArray.WithFilter</A><<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jsr166y/forkjoin/ParallelArray.html#withFilter(jsr166y.forkjoin.Ops.Predicate)">withFilter</A></B>(<A HREF="../../jsr166y/forkjoin/Ops.Predicate.html" title="interface in jsr166y.forkjoin">Ops.Predicate</A><? super <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>> selector)</CODE>
<BR>
Returns an operation prefix that causes a method to operate
only on the elements of the array for which the given selector
returns true</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY="">
<TR ALIGN="right" VALIGN="">
<TD NOWRAP><FONT SIZE="-1">
<CODE><U> <A HREF="../../jsr166y/forkjoin/ParallelArray.WithMapping.html" title="class in jsr166y.forkjoin">ParallelArray.WithMapping</A><<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>,U></CODE></FONT></TD>
</TR>
</TABLE>
</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jsr166y/forkjoin/ParallelArray.html#withMapping(jsr166y.forkjoin.Ops.Mapper)">withMapping</A></B>(<A HREF="../../jsr166y/forkjoin/Ops.Mapper.html" title="interface in jsr166y.forkjoin">Ops.Mapper</A><? super <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>,? extends U> mapper)</CODE>
<BR>
Returns an operation prefix that causes a method to operate
on mapped elements of the array using the given mapper.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../jsr166y/forkjoin/ParallelArray.WithDoubleMapping.html" title="class in jsr166y.forkjoin">ParallelArray.WithDoubleMapping</A><<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jsr166y/forkjoin/ParallelArray.html#withMapping(jsr166y.forkjoin.Ops.MapperToDouble)">withMapping</A></B>(<A HREF="../../jsr166y/forkjoin/Ops.MapperToDouble.html" title="interface in jsr166y.forkjoin">Ops.MapperToDouble</A><? super <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>> mapper)</CODE>
<BR>
Returns an operation prefix that causes a method to operate
on mapped elements of the array using the given mapper.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../jsr166y/forkjoin/ParallelArray.WithLongMapping.html" title="class in jsr166y.forkjoin">ParallelArray.WithLongMapping</A><<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../jsr166y/forkjoin/ParallelArray.html#withMapping(jsr166y.forkjoin.Ops.MapperToLong)">withMapping</A></B>(<A HREF="../../jsr166y/forkjoin/Ops.MapperToLong.html" title="interface in jsr166y.forkjoin">Ops.MapperToLong</A><? super <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>> mapper)</CODE>
<BR>
Returns an operation prefix that causes a method to operate
on mapped elements of the array using the given mapper.</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">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
<P>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="ParallelArray(jsr166y.forkjoin.ForkJoinExecutor,java.lang.Object[],int)"><!-- --></A><A NAME="ParallelArray(jsr166y.forkjoin.ForkJoinExecutor, T[], int)"><!-- --></A><H3>
ParallelArray</H3>
<PRE>
protected <B>ParallelArray</B>(<A HREF="../../jsr166y/forkjoin/ForkJoinExecutor.html" title="interface in jsr166y.forkjoin">ForkJoinExecutor</A> executor,
<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>[] array,
int limit)</PRE>
<DL>
<DD>Constructor for use by subclasses to create a new ParallelArray
using the given executor, and initially using the supplied
array, with effective size bound by the given limit. This
constructor is designed to enable extensions via
subclassing. To create a ParallelArray, use <A HREF="../../jsr166y/forkjoin/ParallelArray.html#create(int, java.lang.Class, jsr166y.forkjoin.ForkJoinExecutor)"><CODE>create(int, java.lang.Class<? super T>, jsr166y.forkjoin.ForkJoinExecutor)</CODE></A>,
<A HREF="../../jsr166y/forkjoin/ParallelArray.html#createEmpty(int, java.lang.Class, jsr166y.forkjoin.ForkJoinExecutor)"><CODE>createEmpty(int, java.lang.Class<? super T>, jsr166y.forkjoin.ForkJoinExecutor)</CODE></A>, <A HREF="../../jsr166y/forkjoin/ParallelArray.html#createUsingHandoff(T[], jsr166y.forkjoin.ForkJoinExecutor)"><CODE>createUsingHandoff(T[], jsr166y.forkjoin.ForkJoinExecutor)</CODE></A> or <A HREF="../../jsr166y/forkjoin/ParallelArray.html#createFromCopy(T[], jsr166y.forkjoin.ForkJoinExecutor)"><CODE>createFromCopy(T[], jsr166y.forkjoin.ForkJoinExecutor)</CODE></A>.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>executor</CODE> - the executor<DD><CODE>array</CODE> - the array<DD><CODE>limit</CODE> - the upper bound limit</DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="defaultExecutor()"><!-- --></A><H3>
defaultExecutor</H3>
<PRE>
public static <A HREF="../../jsr166y/forkjoin/ForkJoinExecutor.html" title="interface in jsr166y.forkjoin">ForkJoinExecutor</A> <B>defaultExecutor</B>()</PRE>
<DL>
<DD>Returns a common default executor for use in ParallelArrays.
This executor arranges enough parallelism to use most, but not
necessarily all, of the avaliable processors on this system.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the executor</DL>
</DD>
</DL>
<HR>
<A NAME="create(int, java.lang.Class, jsr166y.forkjoin.ForkJoinExecutor)"><!-- --></A><H3>
create</H3>
<PRE>
public static <T> <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="class in jsr166y.forkjoin">ParallelArray</A><T> <B>create</B>(int size,
java.lang.Class<? super T> elementType,
<A HREF="../../jsr166y/forkjoin/ForkJoinExecutor.html" title="interface in jsr166y.forkjoin">ForkJoinExecutor</A> executor)</PRE>
<DL>
<DD>Creates a new ParallelArray using the given executor and
an array of the given size constructed using the
indicated base element type.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>size</CODE> - the array size<DD><CODE>elementType</CODE> - the type of the elements<DD><CODE>executor</CODE> - the executor</DL>
</DD>
</DL>
<HR>
<A NAME="createUsingHandoff(java.lang.Object[],jsr166y.forkjoin.ForkJoinExecutor)"><!-- --></A><A NAME="createUsingHandoff(T[], jsr166y.forkjoin.ForkJoinExecutor)"><!-- --></A><H3>
createUsingHandoff</H3>
<PRE>
public static <T> <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="class in jsr166y.forkjoin">ParallelArray</A><T> <B>createUsingHandoff</B>(T[] handoff,
<A HREF="../../jsr166y/forkjoin/ForkJoinExecutor.html" title="interface in jsr166y.forkjoin">ForkJoinExecutor</A> executor)</PRE>
<DL>
<DD>Creates a new ParallelArray initially using the given array and
executor. In general, the handed off array should not be used
for other purposes once constructing this ParallelArray. The
given array may be internally replaced by another array in the
course of methods that add or remove elements.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>handoff</CODE> - the array<DD><CODE>executor</CODE> - the executor</DL>
</DD>
</DL>
<HR>
<A NAME="createFromCopy(java.lang.Object[],jsr166y.forkjoin.ForkJoinExecutor)"><!-- --></A><A NAME="createFromCopy(T[], jsr166y.forkjoin.ForkJoinExecutor)"><!-- --></A><H3>
createFromCopy</H3>
<PRE>
public static <T> <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="class in jsr166y.forkjoin">ParallelArray</A><T> <B>createFromCopy</B>(T[] source,
<A HREF="../../jsr166y/forkjoin/ForkJoinExecutor.html" title="interface in jsr166y.forkjoin">ForkJoinExecutor</A> executor)</PRE>
<DL>
<DD>Creates a new ParallelArray using the given executor and
initially holding copies of the given
source elements.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>source</CODE> - the source of initial elements<DD><CODE>executor</CODE> - the executor</DL>
</DD>
</DL>
<HR>
<A NAME="createFromCopy(int,java.lang.Object[],jsr166y.forkjoin.ForkJoinExecutor)"><!-- --></A><A NAME="createFromCopy(int, T[], jsr166y.forkjoin.ForkJoinExecutor)"><!-- --></A><H3>
createFromCopy</H3>
<PRE>
public static <T> <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="class in jsr166y.forkjoin">ParallelArray</A><T> <B>createFromCopy</B>(int size,
T[] source,
<A HREF="../../jsr166y/forkjoin/ForkJoinExecutor.html" title="interface in jsr166y.forkjoin">ForkJoinExecutor</A> executor)</PRE>
<DL>
<DD>Creates a new ParallelArray using an array of the given size,
initially holding copies of the given source truncated or
padded with nulls to obtain the specified length.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>source</CODE> - the source of initial elements<DD><CODE>size</CODE> - the array size<DD><CODE>executor</CODE> - the executor</DL>
</DD>
</DL>
<HR>
<A NAME="createEmpty(int, java.lang.Class, jsr166y.forkjoin.ForkJoinExecutor)"><!-- --></A><H3>
createEmpty</H3>
<PRE>
public static <T> <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="class in jsr166y.forkjoin">ParallelArray</A><T> <B>createEmpty</B>(int size,
java.lang.Class<? super T> elementType,
<A HREF="../../jsr166y/forkjoin/ForkJoinExecutor.html" title="interface in jsr166y.forkjoin">ForkJoinExecutor</A> executor)</PRE>
<DL>
<DD>Creates a new ParallelArray using the given executor and an
array of the given size constructed using the indicated base
element type, but with an initial effective size of zero,
enabling incremental insertion via <A HREF="../../jsr166y/forkjoin/ParallelArray.html#asList()"><CODE>asList()</CODE></A>
operations.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>size</CODE> - the array size<DD><CODE>elementType</CODE> - the type of the elements<DD><CODE>executor</CODE> - the executor</DL>
</DD>
</DL>
<HR>
<A NAME="getExecutor()"><!-- --></A><H3>
getExecutor</H3>
<PRE>
public <A HREF="../../jsr166y/forkjoin/ForkJoinExecutor.html" title="interface in jsr166y.forkjoin">ForkJoinExecutor</A> <B>getExecutor</B>()</PRE>
<DL>
<DD>Returns the executor used for computations
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the executor</DL>
</DD>
</DL>
<HR>
<A NAME="apply(jsr166y.forkjoin.Ops.Procedure)"><!-- --></A><H3>
apply</H3>
<PRE>
public void <B>apply</B>(<A HREF="../../jsr166y/forkjoin/Ops.Procedure.html" title="interface in jsr166y.forkjoin">Ops.Procedure</A><? super <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>> procedure)</PRE>
<DL>
<DD>Applies the given procedure to elements
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>procedure</CODE> - the procedure</DL>
</DD>
</DL>
<HR>
<A NAME="reduce(jsr166y.forkjoin.Ops.Reducer,java.lang.Object)"><!-- --></A><A NAME="reduce(jsr166y.forkjoin.Ops.Reducer, T)"><!-- --></A><H3>
reduce</H3>
<PRE>
public <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A> <B>reduce</B>(<A HREF="../../jsr166y/forkjoin/Ops.Reducer.html" title="interface in jsr166y.forkjoin">Ops.Reducer</A><<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>> reducer,
<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A> base)</PRE>
<DL>
<DD>Returns reduction of elements
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>reducer</CODE> - the reducer<DD><CODE>base</CODE> - the result for an empty array
<DT><B>Returns:</B><DD>reduction</DL>
</DD>
</DL>
<HR>
<A NAME="all()"><!-- --></A><H3>
all</H3>
<PRE>
public <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="class in jsr166y.forkjoin">ParallelArray</A><<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>> <B>all</B>()</PRE>
<DL>
<DD>Returns a new ParallelArray holding all elements
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>a new ParallelArray holding all elements</DL>
</DD>
</DL>
<HR>
<A NAME="all(java.lang.Class)"><!-- --></A><H3>
all</H3>
<PRE>
public <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="class in jsr166y.forkjoin">ParallelArray</A><<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>> <B>all</B>(java.lang.Class<? super <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>> elementType)</PRE>
<DL>
<DD>Returns a new ParallelArray with the given element type holding
all elements
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>elementType</CODE> - the type of the elements
<DT><B>Returns:</B><DD>a new ParallelArray holding all elements</DL>
</DD>
</DL>
<HR>
<A NAME="combine(java.lang.Object[],jsr166y.forkjoin.Ops.Combiner)"><!-- --></A><A NAME="combine(U[], jsr166y.forkjoin.Ops.Combiner)"><!-- --></A><H3>
combine</H3>
<PRE>
public <U,V> <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="class in jsr166y.forkjoin">ParallelArray</A><V> <B>combine</B>(U[] other,
<A HREF="../../jsr166y/forkjoin/Ops.Combiner.html" title="interface in jsr166y.forkjoin">Ops.Combiner</A><? super <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>,? super U,? extends V> combiner)</PRE>
<DL>
<DD>Returns a ParallelArray containing results of
applying <tt>combine(thisElement, otherElement)</tt>
for each element.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>other</CODE> - the other array<DD><CODE>combiner</CODE> - the combiner
<DT><B>Returns:</B><DD>the array of mappings
<DT><B>Throws:</B>
<DD><CODE>java.lang.ArrayIndexOutOfBoundsException</CODE> - if other array is
shorter than this array.</DL>
</DD>
</DL>
<HR>
<A NAME="combine(jsr166y.forkjoin.ParallelArray, jsr166y.forkjoin.Ops.Combiner)"><!-- --></A><H3>
combine</H3>
<PRE>
public <U,V> <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="class in jsr166y.forkjoin">ParallelArray</A><V> <B>combine</B>(<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="class in jsr166y.forkjoin">ParallelArray</A><? extends U> other,
<A HREF="../../jsr166y/forkjoin/Ops.Combiner.html" title="interface in jsr166y.forkjoin">Ops.Combiner</A><? super <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>,? super U,? extends V> combiner)</PRE>
<DL>
<DD>Returns a ParallelArray containing results of
applying <tt>combine(thisElement, otherElement)</tt>
for each element.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>other</CODE> - the other array<DD><CODE>combiner</CODE> - the combiner
<DT><B>Returns:</B><DD>the array of mappings
<DT><B>Throws:</B>
<DD><CODE>java.lang.ArrayIndexOutOfBoundsException</CODE> - if other array is not
the same length as this array.</DL>
</DD>
</DL>
<HR>
<A NAME="combine(java.lang.Object[],jsr166y.forkjoin.Ops.Combiner,java.lang.Class)"><!-- --></A><A NAME="combine(U[], jsr166y.forkjoin.Ops.Combiner, java.lang.Class)"><!-- --></A><H3>
combine</H3>
<PRE>
public <U,V> <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="class in jsr166y.forkjoin">ParallelArray</A><V> <B>combine</B>(U[] other,
<A HREF="../../jsr166y/forkjoin/Ops.Combiner.html" title="interface in jsr166y.forkjoin">Ops.Combiner</A><? super <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>,? super U,? extends V> combiner,
java.lang.Class<? super V> elementType)</PRE>
<DL>
<DD>Returns a ParallelArray containing results of
applying <tt>combine(thisElement, otherElement)</tt>
for each element.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>other</CODE> - the other array<DD><CODE>combiner</CODE> - the combiner<DD><CODE>elementType</CODE> - the type of elements of returned array
<DT><B>Returns:</B><DD>the array of mappings
<DT><B>Throws:</B>
<DD><CODE>java.lang.ArrayIndexOutOfBoundsException</CODE> - if other array is
shorter than this array.</DL>
</DD>
</DL>
<HR>
<A NAME="combine(jsr166y.forkjoin.ParallelArray.WithBounds, jsr166y.forkjoin.Ops.Combiner)"><!-- --></A><H3>
combine</H3>
<PRE>
public <U,V> <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="class in jsr166y.forkjoin">ParallelArray</A><V> <B>combine</B>(<A HREF="../../jsr166y/forkjoin/ParallelArray.WithBounds.html" title="class in jsr166y.forkjoin">ParallelArray.WithBounds</A><? extends U> other,
<A HREF="../../jsr166y/forkjoin/Ops.Combiner.html" title="interface in jsr166y.forkjoin">Ops.Combiner</A><? super <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>,? super U,? extends V> combiner)</PRE>
<DL>
<DD>Returns a ParallelArray containing results of
applying <tt>combine(thisElement, otherElement)</tt>
for each element.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>other</CODE> - the other array segment<DD><CODE>combiner</CODE> - the combiner
<DT><B>Returns:</B><DD>the array of mappings
<DT><B>Throws:</B>
<DD><CODE>java.lang.ArrayIndexOutOfBoundsException</CODE> - if other segment is
shorter than this array.</DL>
</DD>
</DL>
<HR>
<A NAME="combine(jsr166y.forkjoin.ParallelArray.WithBounds, jsr166y.forkjoin.Ops.Combiner, java.lang.Class)"><!-- --></A><H3>
combine</H3>
<PRE>
public <U,V> <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="class in jsr166y.forkjoin">ParallelArray</A><V> <B>combine</B>(<A HREF="../../jsr166y/forkjoin/ParallelArray.WithBounds.html" title="class in jsr166y.forkjoin">ParallelArray.WithBounds</A><? extends U> other,
<A HREF="../../jsr166y/forkjoin/Ops.Combiner.html" title="interface in jsr166y.forkjoin">Ops.Combiner</A><? super <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>,? super U,? extends V> combiner,
java.lang.Class<? super V> elementType)</PRE>
<DL>
<DD>Returns a ParallelArray containing results of
applying <tt>combine(thisElement, otherElement)</tt>
for each element.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>other</CODE> - the other array segment<DD><CODE>combiner</CODE> - the combiner<DD><CODE>elementType</CODE> - the type of elements of returned array
<DT><B>Returns:</B><DD>the array of mappings
<DT><B>Throws:</B>
<DD><CODE>java.lang.ArrayIndexOutOfBoundsException</CODE> - if other array is
shorter than this array.</DL>
</DD>
</DL>
<HR>
<A NAME="combine(jsr166y.forkjoin.ParallelArray, jsr166y.forkjoin.Ops.Combiner, java.lang.Class)"><!-- --></A><H3>
combine</H3>
<PRE>
public <U,V> <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="class in jsr166y.forkjoin">ParallelArray</A><V> <B>combine</B>(<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="class in jsr166y.forkjoin">ParallelArray</A><? extends U> other,
<A HREF="../../jsr166y/forkjoin/Ops.Combiner.html" title="interface in jsr166y.forkjoin">Ops.Combiner</A><? super <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>,? super U,? extends V> combiner,
java.lang.Class<? super V> elementType)</PRE>
<DL>
<DD>Returns a ParallelArray containing results of
applying <tt>combine(thisElement, otherElement)</tt>
for each element.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>other</CODE> - the other array<DD><CODE>combiner</CODE> - the combiner<DD><CODE>elementType</CODE> - the type of elements of returned array
<DT><B>Returns:</B><DD>the array of mappings
<DT><B>Throws:</B>
<DD><CODE>java.lang.ArrayIndexOutOfBoundsException</CODE> - if other array is not
the same length as this array.</DL>
</DD>
</DL>
<HR>
<A NAME="replaceWithTransform(jsr166y.forkjoin.Ops.Mapper)"><!-- --></A><H3>
replaceWithTransform</H3>
<PRE>
public void <B>replaceWithTransform</B>(<A HREF="../../jsr166y/forkjoin/Ops.Mapper.html" title="interface in jsr166y.forkjoin">Ops.Mapper</A><? super <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>,? extends <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>> mapper)</PRE>
<DL>
<DD>Replaces elements with the results of applying the given mapper
to their current values.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>mapper</CODE> - the mapper</DL>
</DD>
</DL>
<HR>
<A NAME="replaceWithMappedIndex(jsr166y.forkjoin.Ops.MapperFromInt)"><!-- --></A><H3>
replaceWithMappedIndex</H3>
<PRE>
public void <B>replaceWithMappedIndex</B>(<A HREF="../../jsr166y/forkjoin/Ops.MapperFromInt.html" title="interface in jsr166y.forkjoin">Ops.MapperFromInt</A><? extends <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>> mapper)</PRE>
<DL>
<DD>Replaces elements with the results of applying the given
mapper to their indices.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>mapper</CODE> - the mapper</DL>
</DD>
</DL>
<HR>
<A NAME="replaceWithGeneratedValue(jsr166y.forkjoin.Ops.Generator)"><!-- --></A><H3>
replaceWithGeneratedValue</H3>
<PRE>
public void <B>replaceWithGeneratedValue</B>(<A HREF="../../jsr166y/forkjoin/Ops.Generator.html" title="interface in jsr166y.forkjoin">Ops.Generator</A><? extends <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>> generator)</PRE>
<DL>
<DD>Replaces elements with the results of applying the given
generator.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>generator</CODE> - the generator</DL>
</DD>
</DL>
<HR>
<A NAME="replaceWithValue(java.lang.Object)"><!-- --></A><A NAME="replaceWithValue(T)"><!-- --></A><H3>
replaceWithValue</H3>
<PRE>
public void <B>replaceWithValue</B>(<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A> value)</PRE>
<DL>
<DD>Replaces elements with the given value.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value</CODE> - the value</DL>
</DD>
</DL>
<HR>
<A NAME="replaceWithCombination(jsr166y.forkjoin.ParallelArray, jsr166y.forkjoin.Ops.Reducer)"><!-- --></A><H3>
replaceWithCombination</H3>
<PRE>
public void <B>replaceWithCombination</B>(<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="class in jsr166y.forkjoin">ParallelArray</A><? extends <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>> other,
<A HREF="../../jsr166y/forkjoin/Ops.Reducer.html" title="interface in jsr166y.forkjoin">Ops.Reducer</A><<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>> combiner)</PRE>
<DL>
<DD>Replaces elements with results of applying
<tt>combine(thisElement, otherElement)</tt>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>other</CODE> - the other array<DD><CODE>combiner</CODE> - the combiner
<DT><B>Throws:</B>
<DD><CODE>java.lang.ArrayIndexOutOfBoundsException</CODE> - if other array has
fewer elements than this array.</DL>
</DD>
</DL>
<HR>
<A NAME="replaceWithCombination(java.lang.Object[],jsr166y.forkjoin.Ops.Reducer)"><!-- --></A><A NAME="replaceWithCombination(T[], jsr166y.forkjoin.Ops.Reducer)"><!-- --></A><H3>
replaceWithCombination</H3>
<PRE>
public void <B>replaceWithCombination</B>(<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>[] other,
<A HREF="../../jsr166y/forkjoin/Ops.Reducer.html" title="interface in jsr166y.forkjoin">Ops.Reducer</A><<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>> combiner)</PRE>
<DL>
<DD>Replaces elements with results of applying
<tt>combine(thisElement, otherElement)</tt>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>other</CODE> - the other array<DD><CODE>combiner</CODE> - the combiner
<DT><B>Throws:</B>
<DD><CODE>java.lang.ArrayIndexOutOfBoundsException</CODE> - if other array has
fewer elements than this array.</DL>
</DD>
</DL>
<HR>
<A NAME="replaceWithCombination(jsr166y.forkjoin.ParallelArray.WithBounds, jsr166y.forkjoin.Ops.Reducer)"><!-- --></A><H3>
replaceWithCombination</H3>
<PRE>
public void <B>replaceWithCombination</B>(<A HREF="../../jsr166y/forkjoin/ParallelArray.WithBounds.html" title="class in jsr166y.forkjoin">ParallelArray.WithBounds</A><? extends <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>> other,
<A HREF="../../jsr166y/forkjoin/Ops.Reducer.html" title="interface in jsr166y.forkjoin">Ops.Reducer</A><<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>> combiner)</PRE>
<DL>
<DD>Replaces elements with results of applying
<tt>combine(thisElement, otherElement)</tt>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>other</CODE> - the other array segment<DD><CODE>combiner</CODE> - the combiner
<DT><B>Throws:</B>
<DD><CODE>java.lang.ArrayIndexOutOfBoundsException</CODE> - if other segment has
fewer elements.than this array,</DL>
</DD>
</DL>
<HR>
<A NAME="indexOf(java.lang.Object)"><!-- --></A><A NAME="indexOf(T)"><!-- --></A><H3>
indexOf</H3>
<PRE>
public int <B>indexOf</B>(<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A> target)</PRE>
<DL>
<DD>Returns the index of some element equal to given target,
or -1 if not present
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>target</CODE> - the element to search for
<DT><B>Returns:</B><DD>the index or -1 if not present</DL>
</DD>
</DL>
<HR>
<A NAME="binarySearch(java.lang.Object)"><!-- --></A><A NAME="binarySearch(T)"><!-- --></A><H3>
binarySearch</H3>
<PRE>
public int <B>binarySearch</B>(<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A> target)</PRE>
<DL>
<DD>Assuming this array is sorted, returns the index of an element
equal to given target, or -1 if not present. If the array
is not sorted, the results are undefined.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>target</CODE> - the element to search for
<DT><B>Returns:</B><DD>the index or -1 if not present</DL>
</DD>
</DL>
<HR>
<A NAME="binarySearch(java.lang.Object,java.util.Comparator)"><!-- --></A><A NAME="binarySearch(T, java.util.Comparator)"><!-- --></A><H3>
binarySearch</H3>
<PRE>
public int <B>binarySearch</B>(<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A> target,
java.util.Comparator<? super <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>> comparator)</PRE>
<DL>
<DD>Assuming this array is sorted with respect to the given
comparator, returns the index of an element equal to given
target, or -1 if not present. If the array is not sorted, the
results are undefined.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>target</CODE> - the element to search for<DD><CODE>comparator</CODE> - the comparator
<DT><B>Returns:</B><DD>the index or -1 if not present</DL>
</DD>
</DL>
<HR>
<A NAME="summary(java.util.Comparator)"><!-- --></A><H3>
summary</H3>
<PRE>
public <A HREF="../../jsr166y/forkjoin/ParallelArray.SummaryStatistics.html" title="interface in jsr166y.forkjoin">ParallelArray.SummaryStatistics</A><<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>> <B>summary</B>(java.util.Comparator<? super <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>> comparator)</PRE>
<DL>
<DD>Returns summary statistics, using the given comparator
to locate minimum and maximum elements.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>comparator</CODE> - the comparator to use for
locating minimum and maximum elements
<DT><B>Returns:</B><DD>the summary.</DL>
</DD>
</DL>
<HR>
<A NAME="summary()"><!-- --></A><H3>
summary</H3>
<PRE>
public <A HREF="../../jsr166y/forkjoin/ParallelArray.SummaryStatistics.html" title="interface in jsr166y.forkjoin">ParallelArray.SummaryStatistics</A><<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>> <B>summary</B>()</PRE>
<DL>
<DD>Returns summary statistics, assuming that all elements are
Comparables
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the summary.</DL>
</DD>
</DL>
<HR>
<A NAME="min(java.util.Comparator)"><!-- --></A><H3>
min</H3>
<PRE>
public <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A> <B>min</B>(java.util.Comparator<? super <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>> comparator)</PRE>
<DL>
<DD>Returns the minimum element, or null if empty
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>comparator</CODE> - the comparator
<DT><B>Returns:</B><DD>minimum element, or null if empty</DL>
</DD>
</DL>
<HR>
<A NAME="min()"><!-- --></A><H3>
min</H3>
<PRE>
public <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A> <B>min</B>()</PRE>
<DL>
<DD>Returns the minimum element, or null if empty,
assuming that all elements are Comparables
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>minimum element, or null if empty
<DT><B>Throws:</B>
<DD><CODE>java.lang.ClassCastException</CODE> - if any element is not Comparable.</DL>
</DD>
</DL>
<HR>
<A NAME="max(java.util.Comparator)"><!-- --></A><H3>
max</H3>
<PRE>
public <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A> <B>max</B>(java.util.Comparator<? super <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>> comparator)</PRE>
<DL>
<DD>Returns the maximum element, or null if empty
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>comparator</CODE> - the comparator
<DT><B>Returns:</B><DD>maximum element, or null if empty</DL>
</DD>
</DL>
<HR>
<A NAME="max()"><!-- --></A><H3>
max</H3>
<PRE>
public <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A> <B>max</B>()</PRE>
<DL>
<DD>Returns the maximum element, or null if empty
assuming that all elements are Comparables
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>maximum element, or null if empty
<DT><B>Throws:</B>
<DD><CODE>java.lang.ClassCastException</CODE> - if any element is not Comparable.</DL>
</DD>
</DL>
<HR>
<A NAME="cumulate(jsr166y.forkjoin.Ops.Reducer,java.lang.Object)"><!-- --></A><A NAME="cumulate(jsr166y.forkjoin.Ops.Reducer, T)"><!-- --></A><H3>
cumulate</H3>
<PRE>
public void <B>cumulate</B>(<A HREF="../../jsr166y/forkjoin/Ops.Reducer.html" title="interface in jsr166y.forkjoin">Ops.Reducer</A><<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>> reducer,
<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A> base)</PRE>
<DL>
<DD>Replaces each element with the running cumulation of applying
the given reducer. For example, if the contents are the numbers
<tt>1, 2, 3</tt>, and the reducer operation adds numbers, then
after invocation of this method, the contents would be <tt>1,
3, 6</tt> (that is, <tt>1, 1+2, 1+2+3</tt>);
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>reducer</CODE> - the reducer<DD><CODE>base</CODE> - the result for an empty array</DL>
</DD>
</DL>
<HR>
<A NAME="precumulate(jsr166y.forkjoin.Ops.Reducer,java.lang.Object)"><!-- --></A><A NAME="precumulate(jsr166y.forkjoin.Ops.Reducer, T)"><!-- --></A><H3>
precumulate</H3>
<PRE>
public <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A> <B>precumulate</B>(<A HREF="../../jsr166y/forkjoin/Ops.Reducer.html" title="interface in jsr166y.forkjoin">Ops.Reducer</A><<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>> reducer,
<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A> base)</PRE>
<DL>
<DD>Replaces each element with the cumulation of applying the given
reducer to all previous values, and returns the total
reduction. For example, if the contents are the numbers <tt>1,
2, 3</tt>, and the reducer operation adds numbers, then after
invocation of this method, the contents would be <tt>0, 1,
3</tt> (that is, <tt>0, 0+1, 0+1+2</tt>, and the return value
would be 6 (that is, <tt> 1+2+3</tt>);
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>reducer</CODE> - the reducer<DD><CODE>base</CODE> - the result for an empty array
<DT><B>Returns:</B><DD>the total reduction</DL>
</DD>
</DL>
<HR>
<A NAME="sort(java.util.Comparator)"><!-- --></A><H3>
sort</H3>
<PRE>
public void <B>sort</B>(java.util.Comparator<? super <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>> comparator)</PRE>
<DL>
<DD>Sorts the array. Unlike Arrays.sort, this sort does
not guarantee that elements with equal keys maintain their
relative position in the array.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>comparator</CODE> - the comparator to use</DL>
</DD>
</DL>
<HR>
<A NAME="sort()"><!-- --></A><H3>
sort</H3>
<PRE>
public void <B>sort</B>()</PRE>
<DL>
<DD>Sorts the array, assuming all elements are Comparable. Unlike
Arrays.sort, this sort does not guarantee that elements
with equal keys maintain their relative position in the array.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE>java.lang.ClassCastException</CODE> - if any element is not Comparable.</DL>
</DD>
</DL>
<HR>
<A NAME="removeConsecutiveDuplicates()"><!-- --></A><H3>
removeConsecutiveDuplicates</H3>
<PRE>
public void <B>removeConsecutiveDuplicates</B>()</PRE>
<DL>
<DD>Removes consecutive elements that are equal (or null), shifting
others leftward, and possibly decreasing size. This method
uses each non-null element's <tt>equals</tt> method to test for
duplication. This method may be used after sorting to ensure
that this ParallelArray contains a set of unique elements.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="removeNulls()"><!-- --></A><H3>
removeNulls</H3>
<PRE>
public void <B>removeNulls</B>()</PRE>
<DL>
<DD>Removes null elements, shifting others leftward, and possibly
decreasing size.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="allUniqueElements()"><!-- --></A><H3>
allUniqueElements</H3>
<PRE>
public <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="class in jsr166y.forkjoin">ParallelArray</A><<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>> <B>allUniqueElements</B>()</PRE>
<DL>
<DD>Returns a new ParallelArray containing only the non-null unique
elements of this array (that is, without any duplicates). This
method uses each element's <tt>equals</tt> method to test for
duplication.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the new ParallelArray</DL>
</DD>
</DL>
<HR>
<A NAME="allNonidenticalElements()"><!-- --></A><H3>
allNonidenticalElements</H3>
<PRE>
public <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="class in jsr166y.forkjoin">ParallelArray</A><<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>> <B>allNonidenticalElements</B>()</PRE>
<DL>
<DD>Returns a new ParallelArray containing only the non-null unique
elements of this array (that is, without any duplicates). This
method uses reference identity to test for duplication.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the new ParallelArray</DL>
</DD>
</DL>
<HR>
<A NAME="withBounds(int, int)"><!-- --></A><H3>
withBounds</H3>
<PRE>
public <A HREF="../../jsr166y/forkjoin/ParallelArray.WithBounds.html" title="class in jsr166y.forkjoin">ParallelArray.WithBounds</A><<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>> <B>withBounds</B>(int firstIndex,
int upperBound)</PRE>
<DL>
<DD>Returns an operation prefix that causes a method to
operate only on the elements of the array between
firstIndex (inclusive) and upperBound (exclusive).
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>firstIndex</CODE> - the lower bound (inclusive)<DD><CODE>upperBound</CODE> - the upper bound (exclusive)
<DT><B>Returns:</B><DD>operation prefix</DL>
</DD>
</DL>
<HR>
<A NAME="withFilter(jsr166y.forkjoin.Ops.Predicate)"><!-- --></A><H3>
withFilter</H3>
<PRE>
public <A HREF="../../jsr166y/forkjoin/ParallelArray.WithFilter.html" title="class in jsr166y.forkjoin">ParallelArray.WithFilter</A><<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>> <B>withFilter</B>(<A HREF="../../jsr166y/forkjoin/Ops.Predicate.html" title="interface in jsr166y.forkjoin">Ops.Predicate</A><? super <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>> selector)</PRE>
<DL>
<DD>Returns an operation prefix that causes a method to operate
only on the elements of the array for which the given selector
returns true
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>selector</CODE> - the selector
<DT><B>Returns:</B><DD>operation prefix</DL>
</DD>
</DL>
<HR>
<A NAME="withMapping(jsr166y.forkjoin.Ops.Mapper)"><!-- --></A><H3>
withMapping</H3>
<PRE>
public <U> <A HREF="../../jsr166y/forkjoin/ParallelArray.WithMapping.html" title="class in jsr166y.forkjoin">ParallelArray.WithMapping</A><<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>,U> <B>withMapping</B>(<A HREF="../../jsr166y/forkjoin/Ops.Mapper.html" title="interface in jsr166y.forkjoin">Ops.Mapper</A><? super <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>,? extends U> mapper)</PRE>
<DL>
<DD>Returns an operation prefix that causes a method to operate
on mapped elements of the array using the given mapper.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>mapper</CODE> - the mapper
<DT><B>Returns:</B><DD>operation prefix</DL>
</DD>
</DL>
<HR>
<A NAME="withMapping(jsr166y.forkjoin.Ops.MapperToDouble)"><!-- --></A><H3>
withMapping</H3>
<PRE>
public <A HREF="../../jsr166y/forkjoin/ParallelArray.WithDoubleMapping.html" title="class in jsr166y.forkjoin">ParallelArray.WithDoubleMapping</A><<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>> <B>withMapping</B>(<A HREF="../../jsr166y/forkjoin/Ops.MapperToDouble.html" title="interface in jsr166y.forkjoin">Ops.MapperToDouble</A><? super <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>> mapper)</PRE>
<DL>
<DD>Returns an operation prefix that causes a method to operate
on mapped elements of the array using the given mapper.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>mapper</CODE> - the mapper
<DT><B>Returns:</B><DD>operation prefix</DL>
</DD>
</DL>
<HR>
<A NAME="withMapping(jsr166y.forkjoin.Ops.MapperToLong)"><!-- --></A><H3>
withMapping</H3>
<PRE>
public <A HREF="../../jsr166y/forkjoin/ParallelArray.WithLongMapping.html" title="class in jsr166y.forkjoin">ParallelArray.WithLongMapping</A><<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>> <B>withMapping</B>(<A HREF="../../jsr166y/forkjoin/Ops.MapperToLong.html" title="interface in jsr166y.forkjoin">Ops.MapperToLong</A><? super <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>> mapper)</PRE>
<DL>
<DD>Returns an operation prefix that causes a method to operate
on mapped elements of the array using the given mapper.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>mapper</CODE> - the mapper
<DT><B>Returns:</B><DD>operation prefix</DL>
</DD>
</DL>
<HR>
<A NAME="iterator()"><!-- --></A><H3>
iterator</H3>
<PRE>
public java.util.Iterator<<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>> <B>iterator</B>()</PRE>
<DL>
<DD>Returns an iterator stepping through each element of the array
up to the current limit. This iterator does <em>not</em>
support the remove operation. However, a full
<tt>ListIterator</tt> supporting add, remove, and set
operations is available via <A HREF="../../jsr166y/forkjoin/ParallelArray.html#asList()"><CODE>asList()</CODE></A>.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>iterator</CODE> in interface <CODE>java.lang.Iterable<<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>an iterator stepping through each element.</DL>
</DD>
</DL>
<HR>
<A NAME="asList()"><!-- --></A><H3>
asList</H3>
<PRE>
public java.util.List<<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>> <B>asList</B>()</PRE>
<DL>
<DD>Returns a view of this ParallelArray as a List. This List has
the same structural and performance characteristics as <CODE>ArrayList</CODE>, and may be used to modify, replace or extend the
bounds of the array underlying this ParallelArray. The methods
supported by this list view are <em>not</em> in general
implemented as parallel operations. This list is also not
itself thread-safe. In particular, performing list updates
while other parallel operations are in progress has undefined
(and surely undesired) effects.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>a list view</DL>
</DD>
</DL>
<HR>
<A NAME="size()"><!-- --></A><H3>
size</H3>
<PRE>
public int <B>size</B>()</PRE>
<DL>
<DD>Returns the effective size of the underlying array. The
effective size is the current limit, if used (see <A HREF="../../jsr166y/forkjoin/ParallelArray.html#setLimit(int)"><CODE>setLimit(int)</CODE></A>), or the length of the array otherwise.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the effective size of array</DL>
</DD>
</DL>
<HR>
<A NAME="get(int)"><!-- --></A><H3>
get</H3>
<PRE>
public <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A> <B>get</B>(int i)</PRE>
<DL>
<DD>Returns the element of the array at the given index
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>i</CODE> - the index
<DT><B>Returns:</B><DD>the element of the array at the given index</DL>
</DD>
</DL>
<HR>
<A NAME="set(int,java.lang.Object)"><!-- --></A><A NAME="set(int, T)"><!-- --></A><H3>
set</H3>
<PRE>
public void <B>set</B>(int i,
<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A> x)</PRE>
<DL>
<DD>Sets the element of the array at the given index to the given value
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>i</CODE> - the index<DD><CODE>x</CODE> - the value</DL>
</DD>
</DL>
<HR>
<A NAME="getArray()"><!-- --></A><H3>
getArray</H3>
<PRE>
public <A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>[] <B>getArray</B>()</PRE>
<DL>
<DD>Returns the underlying array used for computations
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the array</DL>
</DD>
</DL>
<HR>
<A NAME="toString()"><!-- --></A><H3>
toString</H3>
<PRE>
public java.lang.String <B>toString</B>()</PRE>
<DL>
<DD>Equivalent to <tt>asList().toString()</tt>
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE>toString</CODE> in class <CODE>java.lang.Object</CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>a string representation</DL>
</DD>
</DL>
<HR>
<A NAME="addAll(java.lang.Object[])"><!-- --></A><A NAME="addAll(T[])"><!-- --></A><H3>
addAll</H3>
<PRE>
public void <B>addAll</B>(<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>[] other)</PRE>
<DL>
<DD>Equivalent to <tt>AsList.addAll</tt> but specialized for array
arguments and likely to be more efficient.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>other</CODE> - the elements to add</DL>
</DD>
</DL>
<HR>
<A NAME="addAll(jsr166y.forkjoin.ParallelArray)"><!-- --></A><H3>
addAll</H3>
<PRE>
public void <B>addAll</B>(<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="class in jsr166y.forkjoin">ParallelArray</A><<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>> other)</PRE>
<DL>
<DD>Equivalent to <tt>AsList.addAll</tt> but specialized for
ParallelArray arguments and likely to be more efficient.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>other</CODE> - the elements to add</DL>
</DD>
</DL>
<HR>
<A NAME="addAll(jsr166y.forkjoin.ParallelArray.WithBounds)"><!-- --></A><H3>
addAll</H3>
<PRE>
public void <B>addAll</B>(<A HREF="../../jsr166y/forkjoin/ParallelArray.WithBounds.html" title="class in jsr166y.forkjoin">ParallelArray.WithBounds</A><<A HREF="../../jsr166y/forkjoin/ParallelArray.html" title="type parameter in ParallelArray">T</A>> other)</PRE>
<DL>
<DD>Equivalent to <tt>AsList.addAll</tt> but specialized for
ParallelArray arguments and likely to be more efficient.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>other</CODE> - the elements to add</DL>
</DD>
</DL>
<HR>
<A NAME="setLimit(int)"><!-- --></A><H3>
setLimit</H3>
<PRE>
public final void <B>setLimit</B>(int newLimit)</PRE>
<DL>
<DD>Ensures that the underlying array can be accessed up to the
given upper bound, reallocating and copying the underlying
array to expand if necessary. Or, if the given limit is less
than the length of the underlying array, causes computations to
ignore elements past the given limit.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>newLimit</CODE> - the new upper bound
<DT><B>Throws:</B>
<DD><CODE>java.lang.IllegalArgumentException</CODE> - if newLimit less than zero.</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=2 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="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-all.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>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../jsr166y/forkjoin/Ops.RelationalPredicate.html" title="interface in jsr166y.forkjoin"><B>PREV CLASS</B></A>
<A HREF="../../jsr166y/forkjoin/ParallelArray.SummaryStatistics.html" title="interface in jsr166y.forkjoin"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../index.html?jsr166y/forkjoin/ParallelArray.html" target="_top"><B>FRAMES</B></A>
<A HREF="ParallelArray.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: <A HREF="#nested_class_summary">NESTED</A> | FIELD | <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>
</BODY>
</HTML>
|