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
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_201) on Tue Jun 16 07:41:33 AEST 2020 -->
<title>Term</title>
<meta name="date" content="2020-06-16">
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Term";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":9,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":9,"i10":9,"i11":9,"i12":10,"i13":10,"i14":10,"i15":10,"i16":9,"i17":9,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":10,"i30":10,"i31":10,"i32":9,"i33":10,"i34":10,"i35":10,"i36":42,"i37":10,"i38":9,"i39":10,"i40":9,"i41":10,"i42":10,"i43":10,"i44":41,"i45":6,"i46":10,"i47":10,"i48":10,"i49":10,"i50":9,"i51":9,"i52":9,"i53":42,"i54":10,"i55":9,"i56":9,"i57":9,"i58":9,"i59":9,"i60":42,"i61":6,"i62":6};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],8:["t4","Concrete Methods"],32:["t6","Deprecated Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../index-all.html">Index</a></li>
<li><a href="../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../org/jpl7/Rational.html" title="class in org.jpl7"><span class="typeNameLink">Prev Class</span></a></li>
<li><a href="../../org/jpl7/Util.html" title="class in org.jpl7"><span class="typeNameLink">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../index.html?org/jpl7/Term.html" target="_top">Frames</a></li>
<li><a href="Term.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>Field | </li>
<li><a href="#constructor.summary">Constr</a> | </li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li><a href="#constructor.detail">Constr</a> | </li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.jpl7</div>
<h2 title="Class Term" class="title">Class Term</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>org.jpl7.Term</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>Direct Known Subclasses:</dt>
<dd><a href="../../org/jpl7/Atom.html" title="class in org.jpl7">Atom</a>, <a href="../../org/jpl7/Compound.html" title="class in org.jpl7">Compound</a>, <a href="../../org/jpl7/Dict.html" title="class in org.jpl7">Dict</a>, <a href="../../org/jpl7/Float.html" title="class in org.jpl7">Float</a>, <a href="../../org/jpl7/Integer.html" title="class in org.jpl7">Integer</a>, <a href="../../org/jpl7/JRef.html" title="class in org.jpl7">JRef</a>, <a href="../../org/jpl7/Rational.html" title="class in org.jpl7">Rational</a>, <a href="../../org/jpl7/Variable.html" title="class in org.jpl7">Variable</a></dd>
</dl>
<hr>
<br>
<pre>public abstract class <span class="typeNameLabel">Term</span>
extends java.lang.Object</pre>
<div class="block">Term is the abstract base class for Compound, Atom, Variable, Integer and Float, which comprise a Java-oriented
concrete syntax for Prolog. You cannot create instances of Term directly; rather, you should create instances of
Term's concrete subclasses. Alternatively, use textToTerm() to construct a Term from its conventional Prolog source
text representation.
<hr>
Copyright (C) 2004 Paul Singleton
<p>
Copyright (C) 1998 Fred Dushin
<p>
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
following conditions are met:
<ol>
<li>Redistributions of source code must retain the above copyright notice, this list of conditions and the following
disclaimer.
<li>Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
following disclaimer in the documentation and/or other materials provided with the distribution.
</ol>
<p>
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<hr></div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier</th>
<th class="colLast" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected </code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#Term--">Term</a></span>()</code>
<div class="block">This default constructor enables subclasses to define their own default constructors</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span><span id="t6" class="tableTab"><span><a href="javascript:show(32);">Deprecated Methods</a></span><span class="tabEnd"> </span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code><a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#arg-int-">arg</a></span>(int i)</code>
<div class="block">returns the i-th (1+) argument of a Term;
defined only for Compound</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a>[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#args--">args</a></span>()</code>
<div class="block">The arguments of this Term.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#arity--">arity</a></span>()</code>
<div class="block">the arity of a Compound, Atom, Integer or Float</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>static java.lang.String[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#atomListToStringArray-org.jpl7.Term-">atomListToStringArray</a></span>(<a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a> t)</code>
<div class="block">Converts a term representing a list of atoms into an array of Strings, each element
in the array being a String for the corresponding atom
e.g., [a, b, 1</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#atomType--">atomType</a></span>()</code> </td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>java.math.BigInteger</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#bigValue--">bigValue</a></span>()</code>
<div class="block">the value (as a java.math.BigInteger) of an Integer, whether or not it is big</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>double</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#doubleValue--">doubleValue</a></span>()</code>
<div class="block">the value (as a double) of an Integer or Float</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>float</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#floatValue--">floatValue</a></span>()</code>
<div class="block">the value (as a float) of an Integer or Float</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#getSubst-java.util.Map-java.util.Map-">getSubst</a></span>(java.util.Map<java.lang.String,<a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a>> varnames_to_Terms,
java.util.Map<<a href="../../org/jpl7/fli/term_t.html" title="class in org.jpl7.fli">term_t</a>,<a href="../../org/jpl7/Variable.html" title="class in org.jpl7">Variable</a>> vars_to_Vars)</code>
<div class="block">This method computes a substitution from a Term (the current object).</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>protected static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#getSubsts-java.util.Map-java.util.Map-org.jpl7.Term:A-">getSubsts</a></span>(java.util.Map<java.lang.String,<a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a>> varnames_to_Terms,
java.util.Map<<a href="../../org/jpl7/fli/term_t.html" title="class in org.jpl7.fli">term_t</a>,<a href="../../org/jpl7/Variable.html" title="class in org.jpl7">Variable</a>> vars_to_Vars,
<a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a>[] args)</code>
<div class="block">Just calls computeSubstitution for each Term in the array.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>protected static <a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#getTerm-java.util.Map-org.jpl7.fli.term_t-">getTerm</a></span>(java.util.Map<<a href="../../org/jpl7/fli/term_t.html" title="class in org.jpl7.fli">term_t</a>,<a href="../../org/jpl7/Variable.html" title="class in org.jpl7">Variable</a>> vars_to_Vars,
<a href="../../org/jpl7/fli/term_t.html" title="class in org.jpl7.fli">term_t</a> term)</code>
<div class="block">create and return a org.jpl7.Term representation of the given Prolog term</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>protected static <a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#getTerm-org.jpl7.fli.term_t-">getTerm</a></span>(<a href="../../org/jpl7/fli/term_t.html" title="class in org.jpl7.fli">term_t</a> term)</code> </td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#hasFunctor-java.math.BigInteger-int-">hasFunctor</a></span>(java.math.BigInteger name,
int arity)</code>
<div class="block">Tests whether this Term's functor has 'name' and 'arity'</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#hasFunctor-double-int-">hasFunctor</a></span>(double name,
int arity)</code>
<div class="block">Tests whether this Term's functor has 'name' and 'arity'</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#hasFunctor-long-int-">hasFunctor</a></span>(long name,
int arity)</code>
<div class="block">Tests whether this Term's functor has 'name' and 'arity'</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#hasFunctor-java.lang.String-int-">hasFunctor</a></span>(java.lang.String name,
int arity)</code>
<div class="block">Whether this Term's functor has 'name' and 'arity' (c.f.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>static <a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#intArrayArrayToList-int:A:A-">intArrayArrayToList</a></span>(int[][] a)</code>
<div class="block">Converts an array of arrays of int to a corresponding JPL list of lists</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>static <a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#intArrayToList-int:A-">intArrayToList</a></span>(int[] a)</code>
<div class="block">Converts an array of int to a corresponding JPL list</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#intValue--">intValue</a></span>()</code>
<div class="block">returns the value (as an int) of an Integer or Float</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#isAtom--">isAtom</a></span>()</code>
<div class="block">whether this Term is an Atom (of any type)</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code>protected boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#isAtomOfNameType-java.lang.String-java.lang.String-">isAtomOfNameType</a></span>(java.lang.String name,
java.lang.String type)</code>
<div class="block">Tests whether this Term is an Atom with name and type.</div>
</td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#isBig--">isBig</a></span>()</code>
<div class="block">Tests whether this Integer's value is too big to represent as a long.</div>
</td>
</tr>
<tr id="i22" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#isBigInteger--">isBigInteger</a></span>()</code>
<div class="block">Tests whether this Term is an Integer whose value is too big to represent as a long</div>
</td>
</tr>
<tr id="i23" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#isCompound--">isCompound</a></span>()</code>
<div class="block">Tests whether this Term is a Compound.</div>
</td>
</tr>
<tr id="i24" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#isFloat--">isFloat</a></span>()</code>
<div class="block">Tests whether this Term is an org.jpl7.Float.</div>
</td>
</tr>
<tr id="i25" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#isInteger--">isInteger</a></span>()</code>
<div class="block">Tests whether this Term is an org.jpl7.Integer.</div>
</td>
</tr>
<tr id="i26" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#isJFalse--">isJFalse</a></span>()</code>
<div class="block">Tests whether this Term is a 'jfalse' structure, i.e.</div>
</td>
</tr>
<tr id="i27" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#isJNull--">isJNull</a></span>()</code>
<div class="block">Tests whether this Term is a 'jnull' structure, i.e.</div>
</td>
</tr>
<tr id="i28" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#isJRef--">isJRef</a></span>()</code>
<div class="block">Tests whether this Term is a (non-null, non-String) JPL reference to a Java object, e.g.</div>
</td>
</tr>
<tr id="i29" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#isJTrue--">isJTrue</a></span>()</code>
<div class="block">Tests whether this Term is a 'jtrue' structure, i.e.</div>
</td>
</tr>
<tr id="i30" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#isJVoid--">isJVoid</a></span>()</code>
<div class="block">Tests whether this Term is a 'jvoid' structure, i.e.</div>
</td>
</tr>
<tr id="i31" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#isList--">isList</a></span>()</code>
<div class="block">whether the Term represents a proper list</div>
</td>
</tr>
<tr id="i32" class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#isList-org.jpl7.Term-">isList</a></span>(<a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a> term)</code>
<div class="block">whether the Term represents a proper list</div>
</td>
</tr>
<tr id="i33" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#isListNil--">isListNil</a></span>()</code>
<div class="block">Tests whether this Term denotes an empty list within the current syntax ("traditional" or "modern").</div>
</td>
</tr>
<tr id="i34" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#isListPair--">isListPair</a></span>()</code>
<div class="block">Tests whether this Term is a list pair within the current
syntax ("traditional" or "modern").</div>
</td>
</tr>
<tr id="i35" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#isVariable--">isVariable</a></span>()</code>
<div class="block">Tests whether this Term is a Variable.</div>
</td>
</tr>
<tr id="i36" class="altColor">
<td class="colFirst"><code>java.lang.Object</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#jrefToObject--">jrefToObject</a></span>()</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
<div class="block"><span class="deprecationComment">Use <a href="../../org/jpl7/Term.html#object--"><code>object()</code></a></span></div>
</div>
</td>
</tr>
<tr id="i37" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#listLength--">listLength</a></span>()</code> </td>
</tr>
<tr id="i38" class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#listLength-org.jpl7.Term-">listLength</a></span>(<a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a> term)</code> </td>
</tr>
<tr id="i39" class="rowColor">
<td class="colFirst"><code><a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a>[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#listToTermArray--">listToTermArray</a></span>()</code>
<div class="block">converts a proper list to an array of terms, else throws an exception</div>
</td>
</tr>
<tr id="i40" class="altColor">
<td class="colFirst"><code>static <a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a>[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#listToTermArray-org.jpl7.Term-">listToTermArray</a></span>(<a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a> t)</code>
<div class="block">converts a proper list to an array of terms, else throws an exception</div>
</td>
</tr>
<tr id="i41" class="rowColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#longValue--">longValue</a></span>()</code>
<div class="block">The (long) value of a Float or Integer.</div>
</td>
</tr>
<tr id="i42" class="altColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#name--">name</a></span>()</code>
<div class="block">The name of an Atom, Compound or Variable.</div>
</td>
</tr>
<tr id="i43" class="rowColor">
<td class="colFirst"><code>java.lang.Object</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#object--">object</a></span>()</code>
<div class="block">The Object which this org.jpl7.JRef refers to, iff this Term is a JRef or just JPL.JNULL.</div>
</td>
</tr>
<tr id="i44" class="altColor">
<td class="colFirst"><code>static <a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#objectToJRef-java.lang.Object-">objectToJRef</a></span>(java.lang.Object object)</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
<div class="block"><span class="deprecationComment">Use <a href="../../org/jpl7/JPL.html#newJRef-java.lang.Object-"><code>JPL.newJRef(java.lang.Object)</code></a></span></div>
</div>
</td>
</tr>
<tr id="i45" class="rowColor">
<td class="colFirst"><code>protected abstract void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#put-java.util.Map-org.jpl7.fli.term_t-">put</a></span>(java.util.Map<java.lang.String,<a href="../../org/jpl7/fli/term_t.html" title="class in org.jpl7.fli">term_t</a>> varnames_to_vars,
<a href="../../org/jpl7/fli/term_t.html" title="class in org.jpl7.fli">term_t</a> term)</code>
<div class="block">Cache the reference to the Prolog term_t here.</div>
</td>
</tr>
<tr id="i46" class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#put-org.jpl7.fli.term_t-">put</a></span>(<a href="../../org/jpl7/fli/term_t.html" title="class in org.jpl7.fli">term_t</a> term)</code> </td>
</tr>
<tr id="i47" class="rowColor">
<td class="colFirst"><code>protected <a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#putParams-org.jpl7.Term-">putParams</a></span>(<a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a> plist)</code> </td>
</tr>
<tr id="i48" class="altColor">
<td class="colFirst"><code><a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#putParams-org.jpl7.Term:A-">putParams</a></span>(<a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a>[] params)</code>
<div class="block">This internal method is public because it needs to be callable via JNI, but it is not part of JPL's public API
and should not be used by applications.</div>
</td>
</tr>
<tr id="i49" class="rowColor">
<td class="colFirst"><code>protected <a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#putParams1-org.jpl7.fli.IntHolder-org.jpl7.Term:A-">putParams1</a></span>(<a href="../../org/jpl7/fli/IntHolder.html" title="class in org.jpl7.fli">IntHolder</a> next,
<a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a>[] ps)</code> </td>
</tr>
<tr id="i50" class="altColor">
<td class="colFirst"><code>protected static <a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a>[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#putParams2-org.jpl7.Term:A-org.jpl7.fli.IntHolder-org.jpl7.Term:A-">putParams2</a></span>(<a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a>[] ts,
<a href="../../org/jpl7/fli/IntHolder.html" title="class in org.jpl7.fli">IntHolder</a> next,
<a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a>[] ps)</code> </td>
</tr>
<tr id="i51" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#putTerm-java.lang.Object-org.jpl7.fli.term_t-">putTerm</a></span>(java.lang.Object obj,
<a href="../../org/jpl7/fli/term_t.html" title="class in org.jpl7.fli">term_t</a> termref)</code> </td>
</tr>
<tr id="i52" class="altColor">
<td class="colFirst"><code>protected static <a href="../../org/jpl7/fli/term_t.html" title="class in org.jpl7.fli">term_t</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#putTerms-java.util.Map-org.jpl7.Term:A-">putTerms</a></span>(java.util.Map<java.lang.String,<a href="../../org/jpl7/fli/term_t.html" title="class in org.jpl7.fli">term_t</a>> varnames_to_vars,
<a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a>[] args)</code>
<div class="block">This static method converts an array of Terms to a *consecutive* sequence of term_t objects.</div>
</td>
</tr>
<tr id="i53" class="rowColor">
<td class="colFirst"><code>java.lang.Object</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#ref--">ref</a></span>()</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
<div class="block"><span class="deprecationComment">Use <a href="../../org/jpl7/JRef.html#object--"><code>JRef.object()</code></a></span></div>
</div>
</td>
</tr>
<tr id="i54" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#setName-java.lang.String-">setName</a></span>(java.lang.String name)</code> </td>
</tr>
<tr id="i55" class="rowColor">
<td class="colFirst"><code>static <a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#stringArrayToList-java.lang.String:A-">stringArrayToList</a></span>(java.lang.String[] a)</code>
<div class="block">Converts an array of String to a corresponding JPL list of atoms</div>
</td>
</tr>
<tr id="i56" class="altColor">
<td class="colFirst"><code>static <a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#termArrayToList-org.jpl7.Term:A-">termArrayToList</a></span>(<a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a>[] terms)</code>
<div class="block">Converts an array of Terms to a JPL representation of a Prolog list of terms whose members correspond to the
respective array elements.</div>
</td>
</tr>
<tr id="i57" class="rowColor">
<td class="colFirst"><code>static <a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#textParamsToTerm-java.lang.String-org.jpl7.Term:A-">textParamsToTerm</a></span>(java.lang.String text,
<a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a>[] params)</code>
<div class="block">Converts a Prolog source text to a corresponding JPL Term (in which each Variable has the appropriate name from
the source text), replacing successive occurrences of ? in the text by the corresponding element of Term[]
params.</div>
</td>
</tr>
<tr id="i58" class="altColor">
<td class="colFirst"><code>static <a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#textToTerm-java.lang.String-">textToTerm</a></span>(java.lang.String text)</code>
<div class="block">Converts a Prolog source text (as a String) to a corresponding JPL Term
(in which each Variable has the appropriate name from the source text).</div>
</td>
</tr>
<tr id="i59" class="rowColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#toString-org.jpl7.Term:A-">toString</a></span>(<a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a>[] args)</code>
<div class="block">Converts a list of Terms to a String.</div>
</td>
</tr>
<tr id="i60" class="altColor">
<td class="colFirst"><code><a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a>[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#toTermArray--">toTermArray</a></span>()</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
<div class="block"><span class="deprecationComment">Use <a href="../../org/jpl7/Term.html#listToTermArray--"><code>listToTermArray()</code></a></span></div>
</div>
</td>
</tr>
<tr id="i61" class="rowColor">
<td class="colFirst"><code>abstract int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#type--">type</a></span>()</code>
<div class="block">returns the type of this term, as one of org.jpl7.fli.Prolog.COMPOUND, .ATOM, .VARIABLE, .INTEGER, .FLOAT etc</div>
</td>
</tr>
<tr id="i62" class="altColor">
<td class="colFirst"><code>abstract java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../org/jpl7/Term.html#typeName--">typeName</a></span>()</code>
<div class="block">returns the name of the type of this term, as one of "Compound", "Atom", "Variable", "Integer", "Float" or "JRef"</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="Term--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>Term</h4>
<pre>protected Term()</pre>
<div class="block">This default constructor enables subclasses to define their own default constructors</div>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="arg-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>arg</h4>
<pre>public <a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a> arg(int i)</pre>
<div class="block">returns the i-th (1+) argument of a Term;
defined only for Compound</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>i</code> - the index of argument to return</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the i-th argument of a (Compound) Term</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../org/jpl7/JPLException.html" title="class in org.jpl7">JPLException</a></code> - if Term is not a Compound</dd>
</dl>
</li>
</ul>
<a name="args--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>args</h4>
<pre>public <a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a>[] args()</pre>
<div class="block">The arguments of this Term.
<p>
Note that a SWI Prolog 7.x compound term can have zero arguments.
<p>
This method returns an empty Term[] from an Atom, Float, Integer or JRef,
approximating the behaviour of SWI Prolog's =../2</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the arguments of a Compound</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../org/jpl7/JPLException.html" title="class in org.jpl7">JPLException</a></code> - if the Term is a Variable</dd>
</dl>
</li>
</ul>
<a name="arity--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>arity</h4>
<pre>public int arity()</pre>
<div class="block">the arity of a Compound, Atom, Integer or Float</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the arity of a Compound, Atom, Integer or Float</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../org/jpl7/JPLException.html" title="class in org.jpl7">JPLException</a></code> - if the Term is a Variable</dd>
</dl>
</li>
</ul>
<a name="atomType--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>atomType</h4>
<pre>public java.lang.String atomType()</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the type ("text", "string", "reserved_symbol", "jref" etc.) of an Atom</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../org/jpl7/JPLException.html" title="class in org.jpl7">JPLException</a></code> - if the Term is not an Atom</dd>
</dl>
</li>
</ul>
<a name="name--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>name</h4>
<pre>public java.lang.String name()</pre>
<div class="block">The name of an Atom, Compound or Variable.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the name of an Atom, Compound or Variable.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../org/jpl7/JPLException.html" title="class in org.jpl7">JPLException</a></code> - if this Term is not an Atom, Compound or Variable.</dd>
</dl>
</li>
</ul>
<a name="setName-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setName</h4>
<pre>public void setName(java.lang.String name)</pre>
</li>
</ul>
<a name="textToTerm-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>textToTerm</h4>
<pre>public static <a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a> textToTerm(java.lang.String text)</pre>
<div class="block">Converts a Prolog source text (as a String) to a corresponding JPL Term
(in which each Variable has the appropriate name from the source text).</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>text</code> - A Prolog source text denoting a term</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Term a JPL Term equivalent to the given source text</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../org/jpl7/PrologException.html" title="class in org.jpl7">PrologException</a></code> - containing error(syntax_error(_),_) if text is invalid as a term.</dd>
</dl>
</li>
</ul>
<a name="textParamsToTerm-java.lang.String-org.jpl7.Term:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>textParamsToTerm</h4>
<pre>public static <a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a> textParamsToTerm(java.lang.String text,
<a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a>[] params)</pre>
<div class="block">Converts a Prolog source text to a corresponding JPL Term (in which each Variable has the appropriate name from
the source text), replacing successive occurrences of ? in the text by the corresponding element of Term[]
params. (New in JPL 3.0.4)
Throws PrologException containing error(syntax_error(_),_) if text is invalid.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>text</code> - A Prolog source text denoting a term</dd>
<dd><code>params</code> - parameters to be injected in each ?</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Term a JPL Term equivalent to the given source text</dd>
</dl>
</li>
</ul>
<a name="intValue--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>intValue</h4>
<pre>public int intValue()</pre>
<div class="block">returns the value (as an int) of an Integer or Float</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the value (as an int) of an Integer or Float</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../org/jpl7/JPLException.html" title="class in org.jpl7">JPLException</a></code> - if this Term is a Compound, Atom or Variable</dd>
</dl>
</li>
</ul>
<a name="longValue--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>longValue</h4>
<pre>public long longValue()</pre>
<div class="block">The (long) value of a Float or Integer.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the (long) value of a Float or Integer.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../org/jpl7/JPLException.html" title="class in org.jpl7">JPLException</a></code> - if this Term is not a Float or Integer.</dd>
</dl>
</li>
</ul>
<a name="bigValue--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>bigValue</h4>
<pre>public java.math.BigInteger bigValue()</pre>
<div class="block">the value (as a java.math.BigInteger) of an Integer, whether or not it is big</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the value (as a java.math.BigInteger) of an Integer, whether or not it is big</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../org/jpl7/JPLException.html" title="class in org.jpl7">JPLException</a></code> - if the Term is not an Integer</dd>
</dl>
</li>
</ul>
<a name="doubleValue--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>doubleValue</h4>
<pre>public double doubleValue()</pre>
<div class="block">the value (as a double) of an Integer or Float</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the value (as a double) of an Integer or Float</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../org/jpl7/JPLException.html" title="class in org.jpl7">JPLException</a></code> - if the Term is neither an Integer nor a Float</dd>
</dl>
</li>
</ul>
<a name="floatValue--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>floatValue</h4>
<pre>public float floatValue()</pre>
<div class="block">the value (as a float) of an Integer or Float</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the value (as a float) of an Integer or Float</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../org/jpl7/JPLException.html" title="class in org.jpl7">JPLException</a></code> - if the Term is neither an Integer nor a Float</dd>
</dl>
</li>
</ul>
<a name="getTerm-java.util.Map-org.jpl7.fli.term_t-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTerm</h4>
<pre>protected static <a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a> getTerm(java.util.Map<<a href="../../org/jpl7/fli/term_t.html" title="class in org.jpl7.fli">term_t</a>,<a href="../../org/jpl7/Variable.html" title="class in org.jpl7">Variable</a>> vars_to_Vars,
<a href="../../org/jpl7/fli/term_t.html" title="class in org.jpl7.fli">term_t</a> term)</pre>
<div class="block">create and return a org.jpl7.Term representation of the given Prolog term</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>vars_to_Vars</code> - A Map from Prolog variables to org.jpl7.Variable instances</dd>
<dd><code>term</code> - The Prolog term (in a term_t holder) to convert</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The converted Term subclass instance.</dd>
</dl>
</li>
</ul>
<a name="getTerm-org.jpl7.fli.term_t-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTerm</h4>
<pre>protected static <a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a> getTerm(<a href="../../org/jpl7/fli/term_t.html" title="class in org.jpl7.fli">term_t</a> term)</pre>
</li>
</ul>
<a name="hasFunctor-java.lang.String-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hasFunctor</h4>
<pre>public boolean hasFunctor(java.lang.String name,
int arity)</pre>
<div class="block">Whether this Term's functor has 'name' and 'arity' (c.f. behaviour of SWI Prolog's functor/3)</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - a possible name for the functor of a term</dd>
<dd><code>arity</code> - an arity 0+</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>whether this Term's functor has 'name' and 'arity'</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../org/jpl7/JPLException.html" title="class in org.jpl7">JPLException</a></code> - if this Term is a Variable</dd>
</dl>
</li>
</ul>
<a name="hasFunctor-long-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hasFunctor</h4>
<pre>public boolean hasFunctor(long name,
int arity)</pre>
<div class="block">Tests whether this Term's functor has 'name' and 'arity'
<p>
For Float and Integer, mimics behaviour of SWI Prolog's functor/3</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - a possible name for the functor of a term</dd>
<dd><code>arity</code> - an arity 0+</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>whether this Term's functor has 'name' and 'arity'</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../org/jpl7/JPLException.html" title="class in org.jpl7">JPLException</a></code> - if this Term is a Variable</dd>
</dl>
</li>
</ul>
<a name="hasFunctor-java.math.BigInteger-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hasFunctor</h4>
<pre>public boolean hasFunctor(java.math.BigInteger name,
int arity)</pre>
<div class="block">Tests whether this Term's functor has 'name' and 'arity'
<p>
For Float and Integer, mimics behaviour of SWI Prolog's functor/3</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - a possible name for the functor of a term</dd>
<dd><code>arity</code> - an arity 0+</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>whether this Term's functor has 'name' and 'arity'</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../org/jpl7/JPLException.html" title="class in org.jpl7">JPLException</a></code> - if this Term is a Variable</dd>
</dl>
</li>
</ul>
<a name="hasFunctor-double-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hasFunctor</h4>
<pre>public boolean hasFunctor(double name,
int arity)</pre>
<div class="block">Tests whether this Term's functor has 'name' and 'arity'
<p>
For Float and Integer, mimics behaviour of SWI Prolog's functor/3</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - a possible name for the functor of a term</dd>
<dd><code>arity</code> - an arity 0+</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>whether this Term's functor has 'name' and 'arity'</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../org/jpl7/JPLException.html" title="class in org.jpl7">JPLException</a></code> - if this Term is a Variable</dd>
</dl>
</li>
</ul>
<a name="isAtom--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isAtom</h4>
<pre>public final boolean isAtom()</pre>
<div class="block">whether this Term is an Atom (of any type)</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>whether this Term is an Atom (of any type)</dd>
</dl>
</li>
</ul>
<a name="isAtomOfNameType-java.lang.String-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isAtomOfNameType</h4>
<pre>protected boolean isAtomOfNameType(java.lang.String name,
java.lang.String type)</pre>
<div class="block">Tests whether this Term is an Atom with name and type.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - any String</dd>
<dd><code>type</code> - an Atom (blob) type, e.g. "text", "reserved_symbol", "string", "jref"</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>whether this Term is an Atom with name and type</dd>
</dl>
</li>
</ul>
<a name="isBig--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isBig</h4>
<pre>public boolean isBig()</pre>
<div class="block">Tests whether this Integer's value is too big to represent as a long.
<p>
Use this in contexts where the Term is known to be an Integer.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>whether this Integer's value is too big to represent as a long</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../org/jpl7/JPLException.html" title="class in org.jpl7">JPLException</a></code> - if Term is not an org.jpl7.Integer</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../org/jpl7/Term.html#isBigInteger--"><code>isBigInteger()</code></a></dd>
</dl>
</li>
</ul>
<a name="isBigInteger--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isBigInteger</h4>
<pre>public boolean isBigInteger()</pre>
<div class="block">Tests whether this Term is an Integer whose value is too big to represent as a long</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>whether this Term is an Integer whose value is too big to represent as a long</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../org/jpl7/Term.html#isBig--"><code>isBig()</code></a></dd>
</dl>
</li>
</ul>
<a name="isCompound--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isCompound</h4>
<pre>public final boolean isCompound()</pre>
<div class="block">Tests whether this Term is a Compound.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>whether this Term is a Compound.</dd>
</dl>
</li>
</ul>
<a name="isFloat--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isFloat</h4>
<pre>public final boolean isFloat()</pre>
<div class="block">Tests whether this Term is an org.jpl7.Float.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>whether this Term is an org.jpl7.Float.</dd>
</dl>
</li>
</ul>
<a name="isInteger--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isInteger</h4>
<pre>public final boolean isInteger()</pre>
<div class="block">Tests whether this Term is an org.jpl7.Integer.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>whether this Term is an org.jpl7.Integer.</dd>
</dl>
</li>
</ul>
<a name="isJFalse--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isJFalse</h4>
<pre>public boolean isJFalse()</pre>
<div class="block">Tests whether this Term is a 'jfalse' structure, i.e. @(false).</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>whether this Term is a 'jfalse' structure, i.e. @(false).</dd>
</dl>
</li>
</ul>
<a name="isJNull--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isJNull</h4>
<pre>public boolean isJNull()</pre>
<div class="block">Tests whether this Term is a 'jnull' structure, i.e. @(null).</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>whether this Term is a 'jnull' structure, i.e. @(null).</dd>
</dl>
</li>
</ul>
<a name="isJRef--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isJRef</h4>
<pre>public final boolean isJRef()</pre>
<div class="block">Tests whether this Term is a (non-null, non-String) JPL reference to a Java object, e.g. <jref>(0x1234560)</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>whether this Term is a (non-null, non-String) reference to a Java object, e.g. <jref>(0x1234560)</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../org/jpl7/JRef.html#object--"><code>JRef.object()</code></a></dd>
</dl>
</li>
</ul>
<a name="isJTrue--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isJTrue</h4>
<pre>public boolean isJTrue()</pre>
<div class="block">Tests whether this Term is a 'jtrue' structure, i.e. @(true).</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>whether this Term is a 'jtrue' structure, i.e. @(true).</dd>
</dl>
</li>
</ul>
<a name="isJVoid--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isJVoid</h4>
<pre>public boolean isJVoid()</pre>
<div class="block">Tests whether this Term is a 'jvoid' structure, i.e. @(void).</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>whether this Term is a 'jvoid' structure, i.e. @(void).</dd>
</dl>
</li>
</ul>
<a name="isVariable--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isVariable</h4>
<pre>public final boolean isVariable()</pre>
<div class="block">Tests whether this Term is a Variable.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>whether this Term is a Variable.</dd>
</dl>
</li>
</ul>
<a name="object--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>object</h4>
<pre>public java.lang.Object object()</pre>
<div class="block">The Object which this org.jpl7.JRef refers to, iff this Term is a JRef or just JPL.JNULL.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the Object which this Term refers to, iff this Term is a JRef.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../org/jpl7/JPLException.html" title="class in org.jpl7">JPLException</a></code> - if this Term is not a JRef or not NULL term</dd>
</dl>
</li>
</ul>
<a name="objectToJRef-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>objectToJRef</h4>
<pre>@Deprecated
public static final <a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a> objectToJRef(java.lang.Object object)</pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">Use <a href="../../org/jpl7/JPL.html#newJRef-java.lang.Object-"><code>JPL.newJRef(java.lang.Object)</code></a></span></div>
<div class="block">Returns the JREF term for an object</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>object</code> - object of interest</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a new JRef which references object, or @(null) if object == null.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../org/jpl7/JPLException.html" title="class in org.jpl7">JPLException</a></code> - if object is a String.</dd>
</dl>
</li>
</ul>
<a name="put-org.jpl7.fli.term_t-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>put</h4>
<pre>protected void put(<a href="../../org/jpl7/fli/term_t.html" title="class in org.jpl7.fli">term_t</a> term)</pre>
</li>
</ul>
<a name="put-java.util.Map-org.jpl7.fli.term_t-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>put</h4>
<pre>protected abstract void put(java.util.Map<java.lang.String,<a href="../../org/jpl7/fli/term_t.html" title="class in org.jpl7.fli">term_t</a>> varnames_to_vars,
<a href="../../org/jpl7/fli/term_t.html" title="class in org.jpl7.fli">term_t</a> term)</pre>
<div class="block">Cache the reference to the Prolog term_t here.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>varnames_to_vars</code> - A Map from variable names to JPL Variables.</dd>
<dd><code>term</code> - A (previously created) term_t which is to be put with a Prolog term-type appropriate to the Term type
(e.g., Atom, Variable, Compound, etc.) on which the method is invoked.)</dd>
</dl>
</li>
</ul>
<a name="putParams-org.jpl7.Term:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putParams</h4>
<pre>public <a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a> putParams(<a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a>[] params)</pre>
<div class="block">This internal method is public because it needs to be callable via JNI, but it is not part of JPL's public API
and should not be used by applications.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>params</code> - a list of terms to fill the ? placeholders in the Term object</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a new term representing the original term with all its placeholders ? replaced by the corresponding
successive parameter</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../org/jpl7/JPLException.html" title="class in org.jpl7">JPLException</a></code> - if there are more actual than formal parameters.</dd>
</dl>
</li>
</ul>
<a name="putParams-org.jpl7.Term-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putParams</h4>
<pre>protected <a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a> putParams(<a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a> plist)</pre>
</li>
</ul>
<a name="putParams1-org.jpl7.fli.IntHolder-org.jpl7.Term:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putParams1</h4>
<pre>protected <a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a> putParams1(<a href="../../org/jpl7/fli/IntHolder.html" title="class in org.jpl7.fli">IntHolder</a> next,
<a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a>[] ps)</pre>
</li>
</ul>
<a name="putParams2-org.jpl7.Term:A-org.jpl7.fli.IntHolder-org.jpl7.Term:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putParams2</h4>
<pre>protected static <a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a>[] putParams2(<a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a>[] ts,
<a href="../../org/jpl7/fli/IntHolder.html" title="class in org.jpl7.fli">IntHolder</a> next,
<a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a>[] ps)</pre>
</li>
</ul>
<a name="putTerm-java.lang.Object-org.jpl7.fli.term_t-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putTerm</h4>
<pre>public static void putTerm(java.lang.Object obj,
<a href="../../org/jpl7/fli/term_t.html" title="class in org.jpl7.fli">term_t</a> termref)</pre>
</li>
</ul>
<a name="putTerms-java.util.Map-org.jpl7.Term:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putTerms</h4>
<pre>protected static <a href="../../org/jpl7/fli/term_t.html" title="class in org.jpl7.fli">term_t</a> putTerms(java.util.Map<java.lang.String,<a href="../../org/jpl7/fli/term_t.html" title="class in org.jpl7.fli">term_t</a>> varnames_to_vars,
<a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a>[] args)</pre>
<div class="block">This static method converts an array of Terms to a *consecutive* sequence of term_t objects. Note that the first
term_t object returned is a term_t class (structure); the succeeding term_t objects are consecutive references
obtained by incrementing the *value* field of the term_t.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>varnames_to_vars</code> - Map from variable names to JPL Variables.</dd>
<dd><code>args</code> - An array of org.jpl7.Term references.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>consecutive term_t references (first of which is a structure)</dd>
</dl>
</li>
</ul>
<a name="ref--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ref</h4>
<pre>@Deprecated
public java.lang.Object ref()</pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">Use <a href="../../org/jpl7/JRef.html#object--"><code>JRef.object()</code></a></span></div>
<div class="block">The (non-null, non-String) object which this org.jpl7.JRef references.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the (non-null, non-String) object which this org.jpl7.JRef references.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../org/jpl7/JPLException.html" title="class in org.jpl7">JPLException</a></code> - if this Term is not a JRef</dd>
</dl>
</li>
</ul>
<a name="jrefToObject--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>jrefToObject</h4>
<pre>@Deprecated
public java.lang.Object jrefToObject()</pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">Use <a href="../../org/jpl7/Term.html#object--"><code>object()</code></a></span></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the Object which this JRef references</dd>
</dl>
</li>
</ul>
<a name="getSubst-java.util.Map-java.util.Map-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSubst</h4>
<pre>protected void getSubst(java.util.Map<java.lang.String,<a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a>> varnames_to_Terms,
java.util.Map<<a href="../../org/jpl7/fli/term_t.html" title="class in org.jpl7.fli">term_t</a>,<a href="../../org/jpl7/Variable.html" title="class in org.jpl7">Variable</a>> vars_to_Vars)</pre>
<div class="block">This method computes a substitution from a Term (the current object).
The bindings Map varnames_to_Terms maps names of Variables to Terms.
Thus, a substitution is as it is in mathematical logic, a sequence of the form \sigma = {t_0/x_0, ..., t_n/x_n}.
Once the substitution is computed, the substitution should satisfy
\sigma T = t
where T is the Term from which the substitution is computed, and t is the term_t which results from the Prolog
query.
<p>
A second Map, vars_to_Vars, is required: this table holds the Variables that occur (thus far) in the unified term.
The Variable instances in this table are guaranteed to be unique and are keyed on Strings which are Prolog internal
representations of the variables.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>varnames_to_Terms</code> - table holding Term substitutions, keyed on names of Variables.</dd>
<dd><code>vars_to_Vars</code> - A Map holding the Variables that occur thus far in the term; keyed by internal (Prolog) string rep.</dd>
</dl>
</li>
</ul>
<a name="getSubsts-java.util.Map-java.util.Map-org.jpl7.Term:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSubsts</h4>
<pre>protected static void getSubsts(java.util.Map<java.lang.String,<a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a>> varnames_to_Terms,
java.util.Map<<a href="../../org/jpl7/fli/term_t.html" title="class in org.jpl7.fli">term_t</a>,<a href="../../org/jpl7/Variable.html" title="class in org.jpl7">Variable</a>> vars_to_Vars,
<a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a>[] args)</pre>
<div class="block">Just calls computeSubstitution for each Term in the array.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>varnames_to_Terms</code> - a Map from variable names to Terms (what each variable string is to be replaced by)</dd>
<dd><code>vars_to_Vars</code> - a Map from Prolog variables (which may be bounded in the engine) to JPL Variables (which are Java objects)</dd>
<dd><code>args</code> - an array of Terms to which the substitution is to be applied</dd>
</dl>
</li>
</ul>
<a name="toString-org.jpl7.Term:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toString</h4>
<pre>public static java.lang.String toString(<a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a>[] args)</pre>
<div class="block">Converts a list of Terms to a String.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>args</code> - An array of Terms to convert</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>String representation of a list of Terms</dd>
</dl>
</li>
</ul>
<a name="type--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>type</h4>
<pre>public abstract int type()</pre>
<div class="block">returns the type of this term, as one of org.jpl7.fli.Prolog.COMPOUND, .ATOM, .VARIABLE, .INTEGER, .FLOAT etc</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the type of this term, as one of org.jpl7.fli.Prolog.COMPOUND, .ATOM, .VARIABLE, .INTEGER, .FLOAT etc</dd>
</dl>
</li>
</ul>
<a name="typeName--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>typeName</h4>
<pre>public abstract java.lang.String typeName()</pre>
<div class="block">returns the name of the type of this term, as one of "Compound", "Atom", "Variable", "Integer", "Float" or "JRef"</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the name of the type of this term, as one of "Compound", "Atom", "Variable", "Integer", "Float" or "JRef"</dd>
</dl>
</li>
</ul>
<a name="isListNil--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isListNil</h4>
<pre>public boolean isListNil()</pre>
<div class="block">Tests whether this Term denotes an empty list within the current syntax ("traditional" or "modern").</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>whether this Term denotes an empty list within the current syntax ("traditional" or "modern").</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../org/jpl7/JPL.html#getSyntax--"><code>JPL.getSyntax()</code></a></dd>
</dl>
</li>
</ul>
<a name="isListPair--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isListPair</h4>
<pre>public boolean isListPair()</pre>
<div class="block">Tests whether this Term is a list pair within the current
syntax ("traditional" or "modern").
Note that a list pair may not be a list itself and hence isList() will return false
as the second argument many not be a list</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>whether this Term is a list pair within the current syntax ("traditional" or "modern").</dd>
</dl>
</li>
</ul>
<a name="isList--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isList</h4>
<pre>public final boolean isList()</pre>
<div class="block">whether the Term represents a proper list</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>whether the Term represents a proper list</dd>
</dl>
</li>
</ul>
<a name="isList-org.jpl7.Term-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isList</h4>
<pre>public static final boolean isList(<a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a> term)</pre>
<div class="block">whether the Term represents a proper list</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>term</code> - the term to check if it is a list</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>whether the Term represents a proper list</dd>
</dl>
</li>
</ul>
<a name="listLength-org.jpl7.Term-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>listLength</h4>
<pre>public static int listLength(<a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a> term)</pre>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>term</code> - any Term</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the length of the proper list which the Term represents, else -1</dd>
</dl>
</li>
</ul>
<a name="listLength--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>listLength</h4>
<pre>public int listLength()</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the length of the proper list which the Term represents, else -1</dd>
</dl>
</li>
</ul>
<a name="stringArrayToList-java.lang.String:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>stringArrayToList</h4>
<pre>public static <a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a> stringArrayToList(java.lang.String[] a)</pre>
<div class="block">Converts an array of String to a corresponding JPL list of atoms</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>a</code> - An array of String objects</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Term a JPL list of atoms corresponding to the given String array</dd>
</dl>
</li>
</ul>
<a name="intArrayToList-int:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>intArrayToList</h4>
<pre>public static <a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a> intArrayToList(int[] a)</pre>
<div class="block">Converts an array of int to a corresponding JPL list</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>a</code> - An array of int values</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Term a JPL list corresponding to the given int array</dd>
</dl>
</li>
</ul>
<a name="intArrayArrayToList-int:A:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>intArrayArrayToList</h4>
<pre>public static <a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a> intArrayArrayToList(int[][] a)</pre>
<div class="block">Converts an array of arrays of int to a corresponding JPL list of lists</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>a</code> - An array of arrays of int values</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Term a JPL list of lists corresponding to the given int array of arrays</dd>
</dl>
</li>
</ul>
<a name="termArrayToList-org.jpl7.Term:A-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>termArrayToList</h4>
<pre>public static <a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a> termArrayToList(<a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a>[] terms)</pre>
<div class="block">Converts an array of Terms to a JPL representation of a Prolog list of terms whose members correspond to the
respective array elements.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>terms</code> - An array of Term</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>Term a list of the array elements</dd>
</dl>
</li>
</ul>
<a name="atomListToStringArray-org.jpl7.Term-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>atomListToStringArray</h4>
<pre>public static java.lang.String[] atomListToStringArray(<a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a> t)</pre>
<div class="block">Converts a term representing a list of atoms into an array of Strings, each element
in the array being a String for the corresponding atom
e.g., [a, b, 1</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>t</code> - a term representing a list of atoms</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an array of Strings, each element, null if t is not a list of atoms</dd>
</dl>
</li>
</ul>
<a name="listToTermArray-org.jpl7.Term-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>listToTermArray</h4>
<pre>public static <a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a>[] listToTermArray(<a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a> t)</pre>
<div class="block">converts a proper list to an array of terms, else throws an exception</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an array of terms whose successive elements are the corresponding members of the list (if it is a list)</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../org/jpl7/JPLException.html" title="class in org.jpl7">JPLException</a></code> - if the term passed is not itself a Prolog list term</dd>
</dl>
</li>
</ul>
<a name="listToTermArray--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>listToTermArray</h4>
<pre>public final <a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a>[] listToTermArray()</pre>
<div class="block">converts a proper list to an array of terms, else throws an exception</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an array of terms whose successive elements are the corresponding members of the list (if it is a list)</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../org/jpl7/JPLException.html" title="class in org.jpl7">JPLException</a></code> - if the term passed is not itself a Prolog list term</dd>
</dl>
</li>
</ul>
<a name="toTermArray--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>toTermArray</h4>
<pre>@Deprecated
public final <a href="../../org/jpl7/Term.html" title="class in org.jpl7">Term</a>[] toTermArray()</pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">Use <a href="../../org/jpl7/Term.html#listToTermArray--"><code>listToTermArray()</code></a></span></div>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../index-all.html">Index</a></li>
<li><a href="../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../org/jpl7/Rational.html" title="class in org.jpl7"><span class="typeNameLink">Prev Class</span></a></li>
<li><a href="../../org/jpl7/Util.html" title="class in org.jpl7"><span class="typeNameLink">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../index.html?org/jpl7/Term.html" target="_top">Frames</a></li>
<li><a href="Term.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>Field | </li>
<li><a href="#constructor.summary">Constr</a> | </li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li><a href="#constructor.detail">Constr</a> | </li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
|