/usr/share/doc/libclosure-compiler-java/api/com/google/javascript/rhino/jstype/UnionType.html is in libclosure-compiler-java-doc 20130227+dfsg1-8.
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 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<title>UnionType (Closure Compiler)</title>
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="UnionType (Closure Compiler)";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><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="../../../../../com/google/javascript/rhino/jstype/TernaryValue.html" title="enum in com.google.javascript.rhino.jstype"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../com/google/javascript/rhino/jstype/UnknownType.html" title="class in com.google.javascript.rhino.jstype"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?com/google/javascript/rhino/jstype/UnionType.html" target="_top">Frames</a></li>
<li><a href="UnionType.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><a href="#nested_classes_inherited_from_class_com.google.javascript.rhino.jstype.JSType">Nested</a> | </li>
<li><a href="#fields_inherited_from_class_com.google.javascript.rhino.jstype.JSType">Field</a> | </li>
<li>Constr | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li>Constr | </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">com.google.javascript.rhino.jstype</div>
<h2 title="Class UnionType" class="title">Class UnionType</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">com.google.javascript.rhino.jstype.JSType</a></li>
<li>
<ul class="inheritance">
<li>com.google.javascript.rhino.jstype.UnionType</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd>java.io.Serializable</dd>
</dl>
<hr>
<br>
<pre>public class <span class="strong">UnionType</span>
extends <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a></pre>
<div class="block">The <code>UnionType</code> implements a common JavaScript idiom in which the
code is specifically designed to work with multiple input types. Because
JavaScript always knows the run-time type of an object value, this is safer
than a C union.<p>
For instance, values of the union type <code>(String,boolean)</code> can be of
type <code>String</code> or of type <code>boolean</code>. The commutativity of the
statement is captured by making <code>(String,boolean)</code> and
<code>(boolean,String)</code> equal.<p>
The implementation of this class prevents the creation of nested
unions.<p></div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../serialized-form.html#com.google.javascript.rhino.jstype.UnionType">Serialized Form</a></dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="nested_class_summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<ul class="blockList">
<li class="blockList"><a name="nested_classes_inherited_from_class_com.google.javascript.rhino.jstype.JSType">
<!-- -->
</a>
<h3>Nested classes/interfaces inherited from class com.google.javascript.rhino.jstype.<a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a></h3>
<code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.TypePair.html" title="class in com.google.javascript.rhino.jstype">JSType.TypePair</a></code></li>
</ul>
</li>
</ul>
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<ul class="blockList">
<li class="blockList"><a name="fields_inherited_from_class_com.google.javascript.rhino.jstype.JSType">
<!-- -->
</a>
<h3>Fields inherited from class com.google.javascript.rhino.jstype.<a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a></h3>
<code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#EMPTY_TYPE_COMPONENT">EMPTY_TYPE_COMPONENT</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#ENUMDECL">ENUMDECL</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#NOT_A_CLASS">NOT_A_CLASS</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#NOT_A_TYPE">NOT_A_TYPE</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#NOT_ENUMDECL">NOT_ENUMDECL</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#templateTypeMap">templateTypeMap</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#UNKNOWN_NAME">UNKNOWN_NAME</a></code></li>
</ul>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../com/google/javascript/rhino/jstype/UnionType.html#autobox()">autobox</a></strong>()</code>
<div class="block">Dereference a type for property access.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/google/javascript/rhino/jstype/UnionType.html#canBeCalled()">canBeCalled</a></strong>()</code>
<div class="block">This predicate is used to test whether a given type can be used as the
'function' in a function call.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../com/google/javascript/rhino/jstype/UnionType.html#collapseUnion()">collapseUnion</a></strong>()</code>
<div class="block">Gets the least supertype of this that's not a union.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/google/javascript/rhino/jstype/UnionType.html#contains(com.google.javascript.rhino.jstype.JSType)">contains</a></strong>(<a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a> type)</code>
<div class="block">A <a href="../../../../../com/google/javascript/rhino/jstype/UnionType.html" title="class in com.google.javascript.rhino.jstype"><code>UnionType</code></a> contains a given type (alternate) iff the member
vector contains it.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../com/google/javascript/rhino/jstype/UnionType.html#findPropertyType(java.lang.String)">findPropertyType</a></strong>(java.lang.String propertyName)</code>
<div class="block">Coerces this type to an Object type, then gets the type of the property
whose name is given.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>java.util.Collection<<a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a>></code></td>
<td class="colLast"><code><strong><a href="../../../../../com/google/javascript/rhino/jstype/UnionType.html#getAlternates()">getAlternates</a></strong>()</code>
<div class="block">Gets the alternate types of this union type.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../com/google/javascript/rhino/jstype/UnionType.html#getLeastSupertype(com.google.javascript.rhino.jstype.JSType)">getLeastSupertype</a></strong>(<a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a> that)</code>
<div class="block">Gets the least supertype of <code>this</code> and <code>that</code>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../com/google/javascript/rhino/jstype/BooleanLiteralSet.html" title="enum in com.google.javascript.rhino.jstype">BooleanLiteralSet</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../com/google/javascript/rhino/jstype/UnionType.html#getPossibleToBooleanOutcomes()">getPossibleToBooleanOutcomes</a></strong>()</code>
<div class="block">Computes the set of possible outcomes of the <code>ToBoolean</code> predicate
for this type.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../com/google/javascript/rhino/jstype/UnionType.html#getRestrictedTypeGivenToBooleanOutcome(boolean)">getRestrictedTypeGivenToBooleanOutcome</a></strong>(boolean outcome)</code>
<div class="block">Computes the restricted type of this type knowing that the
<code>ToBoolean</code> predicate has a specific value.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../com/google/javascript/rhino/jstype/UnionType.html#getRestrictedUnion(com.google.javascript.rhino.jstype.JSType)">getRestrictedUnion</a></strong>(<a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a> type)</code>
<div class="block">Returns a more restricted union type than <code>this</code> one, in which all
subtypes of <code>type</code> have been removed.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.TypePair.html" title="class in com.google.javascript.rhino.jstype">JSType.TypePair</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../com/google/javascript/rhino/jstype/UnionType.html#getTypesUnderEquality(com.google.javascript.rhino.jstype.JSType)">getTypesUnderEquality</a></strong>(<a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a> that)</code>
<div class="block">Computes the subset of <code>this</code> and <code>that</code> types if equality
is observed.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.TypePair.html" title="class in com.google.javascript.rhino.jstype">JSType.TypePair</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../com/google/javascript/rhino/jstype/UnionType.html#getTypesUnderInequality(com.google.javascript.rhino.jstype.JSType)">getTypesUnderInequality</a></strong>(<a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a> that)</code>
<div class="block">Computes the subset of <code>this</code> and <code>that</code> types if inequality
is observed.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.TypePair.html" title="class in com.google.javascript.rhino.jstype">JSType.TypePair</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../com/google/javascript/rhino/jstype/UnionType.html#getTypesUnderShallowInequality(com.google.javascript.rhino.jstype.JSType)">getTypesUnderShallowInequality</a></strong>(<a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a> that)</code>
<div class="block">Computes the subset of <code>this</code> and <code>that</code> types under
shallow inequality.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/google/javascript/rhino/jstype/UnionType.html#hasAnyTemplateTypesInternal()">hasAnyTemplateTypesInternal</a></strong>()</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/google/javascript/rhino/jstype/UnionType.html#hashCode()">hashCode</a></strong>()</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/google/javascript/rhino/jstype/UnionType.html#hasProperty(java.lang.String)">hasProperty</a></strong>(java.lang.String pname)</code>
<div class="block">Checks whether the property is present on the object.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/google/javascript/rhino/jstype/UnionType.html#isDict()">isDict</a></strong>()</code>
<div class="block">Returns true iff <code>this</code> can be a <code>dict</code>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/google/javascript/rhino/jstype/UnionType.html#isNullable()">isNullable</a></strong>()</code>
<div class="block">This predicate determines whether objects of this type can have the
<code>null</code> value, and therefore can appear in contexts where
<code>null</code> is expected.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/google/javascript/rhino/jstype/UnionType.html#isObject()">isObject</a></strong>()</code>
<div class="block">Tests whether this type is an <code>Object</code>, or any subtype thereof.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/google/javascript/rhino/jstype/UnionType.html#isStruct()">isStruct</a></strong>()</code>
<div class="block">Returns true iff <code>this</code> can be a <code>struct</code>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/google/javascript/rhino/jstype/UnionType.html#isSubtype(com.google.javascript.rhino.jstype.JSType)">isSubtype</a></strong>(<a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a> that)</code>
<div class="block">Checks whether <code>this</code> is a subtype of <code>that</code>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/google/javascript/rhino/jstype/UnionType.html#isUnknownType()">isUnknownType</a></strong>()</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/google/javascript/rhino/jstype/UnionType.html#matchConstraint(com.google.javascript.rhino.jstype.JSType)">matchConstraint</a></strong>(<a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a> constraint)</code>
<div class="block">Modify this type so that it matches the specified type.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/google/javascript/rhino/jstype/UnionType.html#matchesNumberContext()">matchesNumberContext</a></strong>()</code>
<div class="block">This predicate is used to test whether a given type can appear in a
numeric context, such as an operand of a multiply operator.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/google/javascript/rhino/jstype/UnionType.html#matchesObjectContext()">matchesObjectContext</a></strong>()</code>
<div class="block">This predicate is used to test whether a given type can appear in an
<code>Object</code> context, such as the expression in a <code>with</code>
statement.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/google/javascript/rhino/jstype/UnionType.html#matchesStringContext()">matchesStringContext</a></strong>()</code>
<div class="block">This predicate is used to test whether a given type can appear in a
<code>String</code> context, such as an operand of a string concat (<code>+</code>)
operator.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../com/google/javascript/rhino/jstype/UnionType.html#restrictByNotNullOrUndefined()">restrictByNotNullOrUndefined</a></strong>()</code>
<div class="block">If this is a union type, returns a union type that does not include
the null or undefined type.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/google/javascript/rhino/jstype/UnionType.html#setValidator(com.google.common.base.Predicate)">setValidator</a></strong>(com.google.common.base.Predicate<<a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a>> validator)</code>
<div class="block">Certain types have constraints on them at resolution-time.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../com/google/javascript/rhino/jstype/TernaryValue.html" title="enum in com.google.javascript.rhino.jstype">TernaryValue</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../com/google/javascript/rhino/jstype/UnionType.html#testForEquality(com.google.javascript.rhino.jstype.JSType)">testForEquality</a></strong>(<a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a> that)</code>
<div class="block">Compares <code>this</code> and <code>that</code>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/google/javascript/rhino/jstype/UnionType.html#toDebugHashCodeString()">toDebugHashCodeString</a></strong>()</code>
<div class="block">A hash code function for diagnosing complicated issues
around type-identity.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../com/google/javascript/rhino/jstype/UnionType.html" title="class in com.google.javascript.rhino.jstype">UnionType</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../com/google/javascript/rhino/jstype/UnionType.html#toMaybeUnionType()">toMaybeUnionType</a></strong>()</code>
<div class="block">Downcasts this to a UnionType, or returns null if this is not a UnionType.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><T> T</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/google/javascript/rhino/jstype/UnionType.html#visit(com.google.javascript.rhino.jstype.Visitor)">visit</a></strong>(<a href="../../../../../com/google/javascript/rhino/jstype/Visitor.html" title="interface in com.google.javascript.rhino.jstype">Visitor</a><T> visitor)</code>
<div class="block">Visit this type with the given visitor.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_com.google.javascript.rhino.jstype.JSType">
<!-- -->
</a>
<h3>Methods inherited from class com.google.javascript.rhino.jstype.<a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a></h3>
<code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#autoboxesTo()">autoboxesTo</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#canCastTo(com.google.javascript.rhino.jstype.JSType)">canCastTo</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#canTestForEqualityWith(com.google.javascript.rhino.jstype.JSType)">canTestForEqualityWith</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#canTestForShallowEqualityWith(com.google.javascript.rhino.jstype.JSType)">canTestForShallowEqualityWith</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#clearResolved()">clearResolved</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#dereference()">dereference</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#differsFrom(com.google.javascript.rhino.jstype.JSType)">differsFrom</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#equals(java.lang.Object)">equals</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#forceResolve(com.google.javascript.rhino.ErrorReporter,%20com.google.javascript.rhino.jstype.StaticScope)">forceResolve</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#getDisplayName()">getDisplayName</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#getGreatestSubtype(com.google.javascript.rhino.jstype.JSType)">getGreatestSubtype</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#getJSDocInfo()">getJSDocInfo</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#getTemplateTypeMap()">getTemplateTypeMap</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#getTypesUnderShallowEquality(com.google.javascript.rhino.jstype.JSType)">getTypesUnderShallowEquality</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#hasAnyTemplateTypes()">hasAnyTemplateTypes</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#hasDisplayName()">hasDisplayName</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#isAllType()">isAllType</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#isArrayType()">isArrayType</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#isBooleanObjectType()">isBooleanObjectType</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#isBooleanValueType()">isBooleanValueType</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#isCheckedUnknownType()">isCheckedUnknownType</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#isConstructor()">isConstructor</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#isDateType()">isDateType</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#isEmptyType()">isEmptyType</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#isEnumElementType()">isEnumElementType</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#isEnumType()">isEnumType</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#isEquivalent(com.google.javascript.rhino.jstype.JSType,%20com.google.javascript.rhino.jstype.JSType)">isEquivalent</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#isEquivalentTo(com.google.javascript.rhino.jstype.JSType)">isEquivalentTo</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#isFunctionPrototypeType()">isFunctionPrototypeType</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#isFunctionType()">isFunctionType</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#isGlobalThisType()">isGlobalThisType</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#isInstanceType()">isInstanceType</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#isInterface()">isInterface</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#isInvariant(com.google.javascript.rhino.jstype.JSType)">isInvariant</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#isNominalConstructor()">isNominalConstructor</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#isNominalType()">isNominalType</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#isNoObjectType()">isNoObjectType</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#isNoResolvedType()">isNoResolvedType</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#isNoType()">isNoType</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#isNullType()">isNullType</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#isNumber()">isNumber</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#isNumberObjectType()">isNumberObjectType</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#isNumberValueType()">isNumberValueType</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#isOrdinaryFunction()">isOrdinaryFunction</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#isRecordType()">isRecordType</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#isRegexpType()">isRegexpType</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#isResolved()">isResolved</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#isString()">isString</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#isStringObjectType()">isStringObjectType</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#isStringValueType()">isStringValueType</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#isTemplateType()">isTemplateType</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#isTemplatizedType()">isTemplatizedType</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#isUnionType()">isUnionType</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#isVoidType()">isVoidType</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#matchesInt32Context()">matchesInt32Context</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#matchesUint32Context()">matchesUint32Context</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#resolve(com.google.javascript.rhino.ErrorReporter,%20com.google.javascript.rhino.jstype.StaticScope)">resolve</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#toAnnotationString()">toAnnotationString</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#toMaybeEnumElementType()">toMaybeEnumElementType</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#toMaybeEnumType()">toMaybeEnumType</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#toMaybeFunctionType()">toMaybeFunctionType</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#toMaybeFunctionType(com.google.javascript.rhino.jstype.JSType)">toMaybeFunctionType</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#toMaybeTemplateType()">toMaybeTemplateType</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#toMaybeTemplateType(com.google.javascript.rhino.jstype.JSType)">toMaybeTemplateType</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#toMaybeTemplatizedType()">toMaybeTemplatizedType</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#toMaybeTemplatizedType(com.google.javascript.rhino.jstype.JSType)">toMaybeTemplatizedType</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#toObjectType()">toObjectType</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#toString()">toString</a>, <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#unboxesTo()">unboxesTo</a></code></li>
</ul>
<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, finalize, getClass, notify, notifyAll, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="getAlternates()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAlternates</h4>
<pre>public java.util.Collection<<a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a>> getAlternates()</pre>
<div class="block">Gets the alternate types of this union type.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>The alternate types of this union type. The returned set is
immutable.</dd></dl>
</li>
</ul>
<a name="matchesNumberContext()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>matchesNumberContext</h4>
<pre>public boolean matchesNumberContext()</pre>
<div class="block">This predicate is used to test whether a given type can appear in a
numeric context, such as an operand of a multiply operator.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#matchesNumberContext()">matchesNumberContext</a></code> in class <code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>true if the type can appear in a numeric context.</dd></dl>
</li>
</ul>
<a name="matchesStringContext()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>matchesStringContext</h4>
<pre>public boolean matchesStringContext()</pre>
<div class="block">This predicate is used to test whether a given type can appear in a
<code>String</code> context, such as an operand of a string concat (<code>+</code>)
operator.<p>
All types have at least the potential for converting to <code>String</code>.
When we add externally defined types, such as a browser OM, we may choose
to add types that do not automatically convert to <code>String</code>.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#matchesStringContext()">matchesStringContext</a></code> in class <code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd><code>true</code> if not <a href="../../../../../com/google/javascript/rhino/jstype/VoidType.html" title="class in com.google.javascript.rhino.jstype"><code>VoidType</code></a></dd></dl>
</li>
</ul>
<a name="matchesObjectContext()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>matchesObjectContext</h4>
<pre>public boolean matchesObjectContext()</pre>
<div class="block">This predicate is used to test whether a given type can appear in an
<code>Object</code> context, such as the expression in a <code>with</code>
statement.<p>
Most types we will encounter, except notably <code>null</code>, have at least
the potential for converting to <code>Object</code>. Host defined objects can
get peculiar.<p>
VOID type is included here because while it is not part of the JavaScript
language, functions returning 'void' type can't be used as operands of
any operator or statement.<p></div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#matchesObjectContext()">matchesObjectContext</a></code> in class <code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd><code>true</code> if the type is not <a href="../../../../../com/google/javascript/rhino/jstype/NullType.html" title="class in com.google.javascript.rhino.jstype"><code>NullType</code></a> or
<a href="../../../../../com/google/javascript/rhino/jstype/VoidType.html" title="class in com.google.javascript.rhino.jstype"><code>VoidType</code></a></dd></dl>
</li>
</ul>
<a name="findPropertyType(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>findPropertyType</h4>
<pre>public <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a> findPropertyType(java.lang.String propertyName)</pre>
<div class="block"><strong>Description copied from class: <code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#findPropertyType(java.lang.String)">JSType</a></code></strong></div>
<div class="block">Coerces this type to an Object type, then gets the type of the property
whose name is given.
Unlike <a href="../../../../../com/google/javascript/rhino/jstype/ObjectType.html#getPropertyType(java.lang.String)"><code>ObjectType.getPropertyType(java.lang.String)</code></a>, returns null if the property
is not found.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#findPropertyType(java.lang.String)">findPropertyType</a></code> in class <code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>The property's type. <code>null</code> if the current type cannot
have properties, or if the type is not found.</dd></dl>
</li>
</ul>
<a name="canBeCalled()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>canBeCalled</h4>
<pre>public boolean canBeCalled()</pre>
<div class="block"><strong>Description copied from class: <code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#canBeCalled()">JSType</a></code></strong></div>
<div class="block">This predicate is used to test whether a given type can be used as the
'function' in a function call.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#canBeCalled()">canBeCalled</a></code> in class <code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd><code>true</code> if this type might be callable.</dd></dl>
</li>
</ul>
<a name="autobox()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>autobox</h4>
<pre>public <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a> autobox()</pre>
<div class="block"><strong>Description copied from class: <code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#autobox()">JSType</a></code></strong></div>
<div class="block">Dereference a type for property access.
Filters null/undefined and autoboxes the resulting type.
Never returns null.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#autobox()">autobox</a></code> in class <code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a></code></dd>
</dl>
</li>
</ul>
<a name="restrictByNotNullOrUndefined()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>restrictByNotNullOrUndefined</h4>
<pre>public <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a> restrictByNotNullOrUndefined()</pre>
<div class="block"><strong>Description copied from class: <code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#restrictByNotNullOrUndefined()">JSType</a></code></strong></div>
<div class="block">If this is a union type, returns a union type that does not include
the null or undefined type.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#restrictByNotNullOrUndefined()">restrictByNotNullOrUndefined</a></code> in class <code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a></code></dd>
</dl>
</li>
</ul>
<a name="testForEquality(com.google.javascript.rhino.jstype.JSType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>testForEquality</h4>
<pre>public <a href="../../../../../com/google/javascript/rhino/jstype/TernaryValue.html" title="enum in com.google.javascript.rhino.jstype">TernaryValue</a> testForEquality(<a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a> that)</pre>
<div class="block"><strong>Description copied from class: <code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#testForEquality(com.google.javascript.rhino.jstype.JSType)">JSType</a></code></strong></div>
<div class="block">Compares <code>this</code> and <code>that</code>.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#testForEquality(com.google.javascript.rhino.jstype.JSType)">testForEquality</a></code> in class <code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd><ul>
<li><a href="../../../../../com/google/javascript/rhino/jstype/TernaryValue.html#TRUE"><code>TernaryValue.TRUE</code></a> if the comparison of values of
<code>this</code> type and <code>that</code> always succeed (such as
<code>undefined</code> compared to <code>null</code>)</li>
<li><a href="../../../../../com/google/javascript/rhino/jstype/TernaryValue.html#FALSE"><code>TernaryValue.FALSE</code></a> if the comparison of values of
<code>this</code> type and <code>that</code> always fails (such as
<code>undefined</code> compared to <code>number</code>)</li>
<li><a href="../../../../../com/google/javascript/rhino/jstype/TernaryValue.html#UNKNOWN"><code>TernaryValue.UNKNOWN</code></a> if the comparison can succeed or
fail depending on the concrete values</li>
</ul></dd></dl>
</li>
</ul>
<a name="isNullable()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isNullable</h4>
<pre>public boolean isNullable()</pre>
<div class="block">This predicate determines whether objects of this type can have the
<code>null</code> value, and therefore can appear in contexts where
<code>null</code> is expected.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#isNullable()">isNullable</a></code> in class <code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd><code>true</code> for everything but <code>Number</code> and
<code>Boolean</code> types.</dd></dl>
</li>
</ul>
<a name="isUnknownType()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isUnknownType</h4>
<pre>public boolean isUnknownType()</pre>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#isUnknownType()">isUnknownType</a></code> in class <code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a></code></dd>
</dl>
</li>
</ul>
<a name="isStruct()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isStruct</h4>
<pre>public boolean isStruct()</pre>
<div class="block"><strong>Description copied from class: <code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#isStruct()">JSType</a></code></strong></div>
<div class="block">Returns true iff <code>this</code> can be a <code>struct</code>.
UnionType overrides the method, assume <code>this</code> is not a union here.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#isStruct()">isStruct</a></code> in class <code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a></code></dd>
</dl>
</li>
</ul>
<a name="isDict()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isDict</h4>
<pre>public boolean isDict()</pre>
<div class="block"><strong>Description copied from class: <code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#isDict()">JSType</a></code></strong></div>
<div class="block">Returns true iff <code>this</code> can be a <code>dict</code>.
UnionType overrides the method, assume <code>this</code> is not a union here.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#isDict()">isDict</a></code> in class <code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a></code></dd>
</dl>
</li>
</ul>
<a name="getLeastSupertype(com.google.javascript.rhino.jstype.JSType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLeastSupertype</h4>
<pre>public <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a> getLeastSupertype(<a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a> that)</pre>
<div class="block"><strong>Description copied from class: <code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#getLeastSupertype(com.google.javascript.rhino.jstype.JSType)">JSType</a></code></strong></div>
<div class="block">Gets the least supertype of <code>this</code> and <code>that</code>.
The least supertype is the join (∨) or supremum of both types in the
type lattice.<p>
Examples:
<ul>
<li><code>number &#8744; *</code> = <code>*</code></li>
<li><code>number &#8744; Object</code> = <code>(number, Object)</code></li>
<li><code>Number &#8744; Object</code> = <code>Object</code></li>
</ul></div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#getLeastSupertype(com.google.javascript.rhino.jstype.JSType)">getLeastSupertype</a></code> in class <code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd><code>this &#8744; that</code></dd></dl>
</li>
</ul>
<a name="hasProperty(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hasProperty</h4>
<pre>public boolean hasProperty(java.lang.String pname)</pre>
<div class="block"><strong>Description copied from class: <code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#hasProperty(java.lang.String)">JSType</a></code></strong></div>
<div class="block">Checks whether the property is present on the object.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#hasProperty(java.lang.String)">hasProperty</a></code> in class <code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>pname</code> - The property name.</dd></dl>
</li>
</ul>
<a name="hashCode()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hashCode</h4>
<pre>public int hashCode()</pre>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#hashCode()">hashCode</a></code> in class <code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a></code></dd>
</dl>
</li>
</ul>
<a name="toMaybeUnionType()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toMaybeUnionType</h4>
<pre>public <a href="../../../../../com/google/javascript/rhino/jstype/UnionType.html" title="class in com.google.javascript.rhino.jstype">UnionType</a> toMaybeUnionType()</pre>
<div class="block"><strong>Description copied from class: <code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#toMaybeUnionType()">JSType</a></code></strong></div>
<div class="block">Downcasts this to a UnionType, or returns null if this is not a UnionType.
Named in honor of Haskell's Maybe type constructor.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#toMaybeUnionType()">toMaybeUnionType</a></code> in class <code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a></code></dd>
</dl>
</li>
</ul>
<a name="isObject()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isObject</h4>
<pre>public boolean isObject()</pre>
<div class="block"><strong>Description copied from class: <code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#isObject()">JSType</a></code></strong></div>
<div class="block">Tests whether this type is an <code>Object</code>, or any subtype thereof.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#isObject()">isObject</a></code> in class <code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd><code>this &lt;: Object</code></dd></dl>
</li>
</ul>
<a name="contains(com.google.javascript.rhino.jstype.JSType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>contains</h4>
<pre>public boolean contains(<a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a> type)</pre>
<div class="block">A <a href="../../../../../com/google/javascript/rhino/jstype/UnionType.html" title="class in com.google.javascript.rhino.jstype"><code>UnionType</code></a> contains a given type (alternate) iff the member
vector contains it.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>type</code> - The alternate which might be in this union.</dd>
<dt><span class="strong">Returns:</span></dt><dd><code>true</code> if the alternate is in the union</dd></dl>
</li>
</ul>
<a name="getRestrictedUnion(com.google.javascript.rhino.jstype.JSType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRestrictedUnion</h4>
<pre>public <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a> getRestrictedUnion(<a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a> type)</pre>
<div class="block">Returns a more restricted union type than <code>this</code> one, in which all
subtypes of <code>type</code> have been removed.<p>
Examples:
<ul>
<li><code>(number,string)</code> restricted by <code>number</code> is
<code>string</code></li>
<li><code>(null, EvalError, URIError)</code> restricted by
<code>Error</code> is <code>null</code></li>
</ul></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>type</code> - the supertype of the types to remove from this union type</dd></dl>
</li>
</ul>
<a name="isSubtype(com.google.javascript.rhino.jstype.JSType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isSubtype</h4>
<pre>public boolean isSubtype(<a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a> that)</pre>
<div class="block"><strong>Description copied from class: <code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#isSubtype(com.google.javascript.rhino.jstype.JSType)">JSType</a></code></strong></div>
<div class="block">Checks whether <code>this</code> is a subtype of <code>that</code>.<p>
Subtyping rules:
<ul>
<li>(unknown) — every type is a subtype of the Unknown type.</li>
<li>(no) — the No type is a subtype of every type.</li>
<li>(no-object) — the NoObject type is a subtype of every object
type (i.e. subtypes of the Object type).</li>
<li>(ref) — a type is a subtype of itself.</li>
<li>(union-l) — A union type is a subtype of a type U if all the
union type's constituents are a subtype of U. Formally<br>
<code>(T<sub>1</sub>, &hellip;, T<sub>n</sub>) &lt;: U</code> if and only
<code>T<sub>k</sub> &lt;: U</code> for all <code>k &isin; 1..n</code>.</li>
<li>(union-r) — A type U is a subtype of a union type if it is a
subtype of one of the union type's constituents. Formally<br>
<code>U &lt;: (T<sub>1</sub>, &hellip;, T<sub>n</sub>)</code> if and only
if <code>U &lt;: T<sub>k</sub></code> for some index <code>k</code>.</li>
<li>(objects) — an Object <code>O<sub>1</sub></code> is a subtype
of an object <code>O<sub>2</sub></code> if it has more properties
than <code>O<sub>2</sub></code> and all common properties are
pairwise subtypes.</li>
</ul></div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#isSubtype(com.google.javascript.rhino.jstype.JSType)">isSubtype</a></code> in class <code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd><code>this &lt;: that</code></dd></dl>
</li>
</ul>
<a name="getRestrictedTypeGivenToBooleanOutcome(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRestrictedTypeGivenToBooleanOutcome</h4>
<pre>public <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a> getRestrictedTypeGivenToBooleanOutcome(boolean outcome)</pre>
<div class="block"><strong>Description copied from class: <code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#getRestrictedTypeGivenToBooleanOutcome(boolean)">JSType</a></code></strong></div>
<div class="block">Computes the restricted type of this type knowing that the
<code>ToBoolean</code> predicate has a specific value. For more information
about the <code>ToBoolean</code> predicate, see
<a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#getPossibleToBooleanOutcomes()"><code>JSType.getPossibleToBooleanOutcomes()</code></a>.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#getRestrictedTypeGivenToBooleanOutcome(boolean)">getRestrictedTypeGivenToBooleanOutcome</a></code> in class <code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>outcome</code> - the value of the <code>ToBoolean</code> predicate</dd>
<dt><span class="strong">Returns:</span></dt><dd>the restricted type, or the Any Type if the underlying type could
not have yielded this ToBoolean value
TODO(user): Move this method to the SemanticRAI and use the visit
method of types to get the restricted type.</dd></dl>
</li>
</ul>
<a name="getPossibleToBooleanOutcomes()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPossibleToBooleanOutcomes</h4>
<pre>public <a href="../../../../../com/google/javascript/rhino/jstype/BooleanLiteralSet.html" title="enum in com.google.javascript.rhino.jstype">BooleanLiteralSet</a> getPossibleToBooleanOutcomes()</pre>
<div class="block"><strong>Description copied from class: <code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#getPossibleToBooleanOutcomes()">JSType</a></code></strong></div>
<div class="block">Computes the set of possible outcomes of the <code>ToBoolean</code> predicate
for this type. The <code>ToBoolean</code> predicate is defined by the ECMA-262
standard, 3<sup>rd</sup> edition. Its behavior for simple types can be
summarized by the following table:
<table>
<tr><th>type</th><th>result</th></tr>
<tr><td><code>undefined</code></td><td>{false}</td></tr>
<tr><td><code>null</code></td><td>{false}</td></tr>
<tr><td><code>boolean</code></td><td>{true, false}</td></tr>
<tr><td><code>number</code></td><td>{true, false}</td></tr>
<tr><td><code>string</code></td><td>{true, false}</td></tr>
<tr><td><code>Object</code></td><td>{true}</td></tr>
</table></div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#getPossibleToBooleanOutcomes()">getPossibleToBooleanOutcomes</a></code> in class <code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>the set of boolean literals for this type</dd></dl>
</li>
</ul>
<a name="getTypesUnderEquality(com.google.javascript.rhino.jstype.JSType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTypesUnderEquality</h4>
<pre>public <a href="../../../../../com/google/javascript/rhino/jstype/JSType.TypePair.html" title="class in com.google.javascript.rhino.jstype">JSType.TypePair</a> getTypesUnderEquality(<a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a> that)</pre>
<div class="block"><strong>Description copied from class: <code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#getTypesUnderEquality(com.google.javascript.rhino.jstype.JSType)">JSType</a></code></strong></div>
<div class="block">Computes the subset of <code>this</code> and <code>that</code> types if equality
is observed. If a value <code>v1</code> of type <code>null</code> is equal to a value
<code>v2</code> of type <code>(undefined,number)</code>, we can infer that the
type of <code>v1</code> is <code>null</code> and the type of <code>v2</code> is
<code>undefined</code>.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#getTypesUnderEquality(com.google.javascript.rhino.jstype.JSType)">getTypesUnderEquality</a></code> in class <code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>a pair containing the restricted type of <code>this</code> as the first
component and the restricted type of <code>that</code> as the second
element. The returned pair is never <code>null</code> even though its
components may be <code>null</code></dd></dl>
</li>
</ul>
<a name="getTypesUnderInequality(com.google.javascript.rhino.jstype.JSType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTypesUnderInequality</h4>
<pre>public <a href="../../../../../com/google/javascript/rhino/jstype/JSType.TypePair.html" title="class in com.google.javascript.rhino.jstype">JSType.TypePair</a> getTypesUnderInequality(<a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a> that)</pre>
<div class="block"><strong>Description copied from class: <code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#getTypesUnderInequality(com.google.javascript.rhino.jstype.JSType)">JSType</a></code></strong></div>
<div class="block">Computes the subset of <code>this</code> and <code>that</code> types if inequality
is observed. If a value <code>v1</code> of type <code>number</code> is not equal to a
value <code>v2</code> of type <code>(undefined,number)</code>, we can infer that the
type of <code>v1</code> is <code>number</code> and the type of <code>v2</code> is
<code>number</code> as well.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#getTypesUnderInequality(com.google.javascript.rhino.jstype.JSType)">getTypesUnderInequality</a></code> in class <code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>a pair containing the restricted type of <code>this</code> as the first
component and the restricted type of <code>that</code> as the second
element. The returned pair is never <code>null</code> even though its
components may be <code>null</code></dd></dl>
</li>
</ul>
<a name="getTypesUnderShallowInequality(com.google.javascript.rhino.jstype.JSType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTypesUnderShallowInequality</h4>
<pre>public <a href="../../../../../com/google/javascript/rhino/jstype/JSType.TypePair.html" title="class in com.google.javascript.rhino.jstype">JSType.TypePair</a> getTypesUnderShallowInequality(<a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a> that)</pre>
<div class="block"><strong>Description copied from class: <code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#getTypesUnderShallowInequality(com.google.javascript.rhino.jstype.JSType)">JSType</a></code></strong></div>
<div class="block">Computes the subset of <code>this</code> and <code>that</code> types under
shallow inequality.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#getTypesUnderShallowInequality(com.google.javascript.rhino.jstype.JSType)">getTypesUnderShallowInequality</a></code> in class <code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>A pair containing the restricted type of <code>this</code> as the first
component and the restricted type of <code>that</code> as the second
element. The returned pair is never <code>null</code> even though its
components may be <code>null</code></dd></dl>
</li>
</ul>
<a name="visit(com.google.javascript.rhino.jstype.Visitor)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>visit</h4>
<pre>public <T> T visit(<a href="../../../../../com/google/javascript/rhino/jstype/Visitor.html" title="interface in com.google.javascript.rhino.jstype">Visitor</a><T> visitor)</pre>
<div class="block"><strong>Description copied from class: <code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#visit(com.google.javascript.rhino.jstype.Visitor)">JSType</a></code></strong></div>
<div class="block">Visit this type with the given visitor.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#visit(com.google.javascript.rhino.jstype.Visitor)">visit</a></code> in class <code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>the value returned by the visitor</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../com/google/javascript/rhino/jstype/Visitor.html" title="interface in com.google.javascript.rhino.jstype"><code>Visitor</code></a></dd></dl>
</li>
</ul>
<a name="toDebugHashCodeString()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toDebugHashCodeString</h4>
<pre>public java.lang.String toDebugHashCodeString()</pre>
<div class="block"><strong>Description copied from class: <code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#toDebugHashCodeString()">JSType</a></code></strong></div>
<div class="block">A hash code function for diagnosing complicated issues
around type-identity.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#toDebugHashCodeString()">toDebugHashCodeString</a></code> in class <code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a></code></dd>
</dl>
</li>
</ul>
<a name="setValidator(com.google.common.base.Predicate)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setValidator</h4>
<pre>public boolean setValidator(com.google.common.base.Predicate<<a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a>> validator)</pre>
<div class="block"><strong>Description copied from class: <code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#setValidator(com.google.common.base.Predicate)">JSType</a></code></strong></div>
<div class="block">Certain types have constraints on them at resolution-time.
For example, a type in an <code>@extends</code> annotation must be an
object. Clients should inject a validator that emits a warning
if the type does not validate, and return false.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#setValidator(com.google.common.base.Predicate)">setValidator</a></code> in class <code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a></code></dd>
</dl>
</li>
</ul>
<a name="collapseUnion()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>collapseUnion</h4>
<pre>public <a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a> collapseUnion()</pre>
<div class="block"><strong>Description copied from class: <code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#collapseUnion()">JSType</a></code></strong></div>
<div class="block">Gets the least supertype of this that's not a union.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#collapseUnion()">collapseUnion</a></code> in class <code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a></code></dd>
</dl>
</li>
</ul>
<a name="matchConstraint(com.google.javascript.rhino.jstype.JSType)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>matchConstraint</h4>
<pre>public void matchConstraint(<a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a> constraint)</pre>
<div class="block"><strong>Description copied from class: <code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#matchConstraint(com.google.javascript.rhino.jstype.JSType)">JSType</a></code></strong></div>
<div class="block">Modify this type so that it matches the specified type.
This is useful for reverse type-inference, where we want to
infer that an object literal matches its constraint (much like
how the java compiler does reverse-inference to figure out generics).</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html#matchConstraint(com.google.javascript.rhino.jstype.JSType)">matchConstraint</a></code> in class <code><a href="../../../../../com/google/javascript/rhino/jstype/JSType.html" title="class in com.google.javascript.rhino.jstype">JSType</a></code></dd>
</dl>
</li>
</ul>
<a name="hasAnyTemplateTypesInternal()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>hasAnyTemplateTypesInternal</h4>
<pre>public boolean hasAnyTemplateTypesInternal()</pre>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><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="../../../../../com/google/javascript/rhino/jstype/TernaryValue.html" title="enum in com.google.javascript.rhino.jstype"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../com/google/javascript/rhino/jstype/UnknownType.html" title="class in com.google.javascript.rhino.jstype"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?com/google/javascript/rhino/jstype/UnionType.html" target="_top">Frames</a></li>
<li><a href="UnionType.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><a href="#nested_classes_inherited_from_class_com.google.javascript.rhino.jstype.JSType">Nested</a> | </li>
<li><a href="#fields_inherited_from_class_com.google.javascript.rhino.jstype.JSType">Field</a> | </li>
<li>Constr | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
|