PageRenderTime 79ms CodeModel.GetById 25ms RepoModel.GetById 0ms app.codeStats 1ms

/jdk-8u31-docs-all/docs/api/java/util/TreeMap.html

https://gitlab.com/PNNutkung/Java-API
HTML | 2016 lines | 1878 code | 25 blank | 113 comment | 0 complexity | e991bd5e2b536a1504c9c1cf13571146 MD5 | raw file
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <!-- NewPage -->
  3. <html lang="en">
  4. <head>
  5. <!-- Generated by javadoc (1.8.0_31) on Wed Dec 17 20:47:34 PST 2014 -->
  6. <title>TreeMap (Java Platform SE 8 )</title>
  7. <meta name="date" content="2014-12-17">
  8. <meta name="keywords" content="java.util.TreeMap class">
  9. <meta name="keywords" content="size()">
  10. <meta name="keywords" content="containsKey()">
  11. <meta name="keywords" content="containsValue()">
  12. <meta name="keywords" content="get()">
  13. <meta name="keywords" content="comparator()">
  14. <meta name="keywords" content="firstKey()">
  15. <meta name="keywords" content="lastKey()">
  16. <meta name="keywords" content="putAll()">
  17. <meta name="keywords" content="put()">
  18. <meta name="keywords" content="remove()">
  19. <meta name="keywords" content="clear()">
  20. <meta name="keywords" content="clone()">
  21. <meta name="keywords" content="firstEntry()">
  22. <meta name="keywords" content="lastEntry()">
  23. <meta name="keywords" content="pollFirstEntry()">
  24. <meta name="keywords" content="pollLastEntry()">
  25. <meta name="keywords" content="lowerEntry()">
  26. <meta name="keywords" content="lowerKey()">
  27. <meta name="keywords" content="floorEntry()">
  28. <meta name="keywords" content="floorKey()">
  29. <meta name="keywords" content="ceilingEntry()">
  30. <meta name="keywords" content="ceilingKey()">
  31. <meta name="keywords" content="higherEntry()">
  32. <meta name="keywords" content="higherKey()">
  33. <meta name="keywords" content="keySet()">
  34. <meta name="keywords" content="navigableKeySet()">
  35. <meta name="keywords" content="descendingKeySet()">
  36. <meta name="keywords" content="values()">
  37. <meta name="keywords" content="entrySet()">
  38. <meta name="keywords" content="descendingMap()">
  39. <meta name="keywords" content="subMap()">
  40. <meta name="keywords" content="headMap()">
  41. <meta name="keywords" content="tailMap()">
  42. <meta name="keywords" content="replace()">
  43. <meta name="keywords" content="forEach()">
  44. <meta name="keywords" content="replaceAll()">
  45. <link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
  46. <script type="text/javascript" src="../../script.js"></script>
  47. </head>
  48. <body>
  49. <script type="text/javascript"><!--
  50. try {
  51. if (location.href.indexOf('is-external=true') == -1) {
  52. parent.document.title="TreeMap (Java Platform SE 8 )";
  53. }
  54. }
  55. catch(err) {
  56. }
  57. //-->
  58. var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"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":10,"i33":10,"i34":10,"i35":10,"i36":10,"i37":10,"i38":10,"i39":10};
  59. var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
  60. var altColor = "altColor";
  61. var rowColor = "rowColor";
  62. var tableTab = "tableTab";
  63. var activeTableTab = "activeTableTab";
  64. </script>
  65. <noscript>
  66. <div>JavaScript is disabled on your browser.</div>
  67. </noscript>
  68. <!-- ========= START OF TOP NAVBAR ======= -->
  69. <div class="topNav"><a name="navbar.top">
  70. <!-- -->
  71. </a>
  72. <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
  73. <a name="navbar.top.firstrow">
  74. <!-- -->
  75. </a>
  76. <ul class="navList" title="Navigation">
  77. <li><a href="../../overview-summary.html">Overview</a></li>
  78. <li><a href="package-summary.html">Package</a></li>
  79. <li class="navBarCell1Rev">Class</li>
  80. <li><a href="class-use/TreeMap.html">Use</a></li>
  81. <li><a href="package-tree.html">Tree</a></li>
  82. <li><a href="../../deprecated-list.html">Deprecated</a></li>
  83. <li><a href="../../index-files/index-1.html">Index</a></li>
  84. <li><a href="../../help-doc.html">Help</a></li>
  85. </ul>
  86. <div class="aboutLanguage"><strong>Java&trade;&nbsp;Platform<br>Standard&nbsp;Ed.&nbsp;8</strong></div>
  87. </div>
  88. <div class="subNav">
  89. <ul class="navList">
  90. <li><a href="../../java/util/TooManyListenersException.html" title="class in java.util"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
  91. <li><a href="../../java/util/TreeSet.html" title="class in java.util"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
  92. </ul>
  93. <ul class="navList">
  94. <li><a href="../../index.html?java/util/TreeMap.html" target="_top">Frames</a></li>
  95. <li><a href="TreeMap.html" target="_top">No&nbsp;Frames</a></li>
  96. </ul>
  97. <ul class="navList" id="allclasses_navbar_top">
  98. <li><a href="../../allclasses-noframe.html">All&nbsp;Classes</a></li>
  99. </ul>
  100. <div>
  101. <script type="text/javascript"><!--
  102. allClassesLink = document.getElementById("allclasses_navbar_top");
  103. if(window==top) {
  104. allClassesLink.style.display = "block";
  105. }
  106. else {
  107. allClassesLink.style.display = "none";
  108. }
  109. //-->
  110. </script>
  111. </div>
  112. <div>
  113. <ul class="subNavList">
  114. <li>Summary:&nbsp;</li>
  115. <li><a href="#nested.classes.inherited.from.class.java.util.AbstractMap">Nested</a>&nbsp;|&nbsp;</li>
  116. <li>Field&nbsp;|&nbsp;</li>
  117. <li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
  118. <li><a href="#method.summary">Method</a></li>
  119. </ul>
  120. <ul class="subNavList">
  121. <li>Detail:&nbsp;</li>
  122. <li>Field&nbsp;|&nbsp;</li>
  123. <li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
  124. <li><a href="#method.detail">Method</a></li>
  125. </ul>
  126. </div>
  127. <a name="skip.navbar.top">
  128. <!-- -->
  129. </a></div>
  130. <!-- ========= END OF TOP NAVBAR ========= -->
  131. <!-- ======== START OF CLASS DATA ======== -->
  132. <div class="header">
  133. <div class="subTitle">compact1, compact2, compact3</div>
  134. <div class="subTitle">java.util</div>
  135. <h2 title="Class TreeMap" class="title">Class TreeMap&lt;K,V&gt;</h2>
  136. </div>
  137. <div class="contentContainer">
  138. <ul class="inheritance">
  139. <li><a href="../../java/lang/Object.html" title="class in java.lang">java.lang.Object</a></li>
  140. <li>
  141. <ul class="inheritance">
  142. <li><a href="../../java/util/AbstractMap.html" title="class in java.util">java.util.AbstractMap</a>&lt;K,V&gt;</li>
  143. <li>
  144. <ul class="inheritance">
  145. <li>java.util.TreeMap&lt;K,V&gt;</li>
  146. </ul>
  147. </li>
  148. </ul>
  149. </li>
  150. </ul>
  151. <div class="description">
  152. <ul class="blockList">
  153. <li class="blockList">
  154. <dl>
  155. <dt><span class="paramLabel">Type Parameters:</span></dt>
  156. <dd><code>K</code> - the type of keys maintained by this map</dd>
  157. <dd><code>V</code> - the type of mapped values</dd>
  158. </dl>
  159. <dl>
  160. <dt>All Implemented Interfaces:</dt>
  161. <dd><a href="../../java/io/Serializable.html" title="interface in java.io">Serializable</a>, <a href="../../java/lang/Cloneable.html" title="interface in java.lang">Cloneable</a>, <a href="../../java/util/Map.html" title="interface in java.util">Map</a>&lt;K,V&gt;, <a href="../../java/util/NavigableMap.html" title="interface in java.util">NavigableMap</a>&lt;K,V&gt;, <a href="../../java/util/SortedMap.html" title="interface in java.util">SortedMap</a>&lt;K,V&gt;</dd>
  162. </dl>
  163. <hr>
  164. <br>
  165. <pre>public class <span class="typeNameLabel">TreeMap&lt;K,V&gt;</span>
  166. extends <a href="../../java/util/AbstractMap.html" title="class in java.util">AbstractMap</a>&lt;K,V&gt;
  167. implements <a href="../../java/util/NavigableMap.html" title="interface in java.util">NavigableMap</a>&lt;K,V&gt;, <a href="../../java/lang/Cloneable.html" title="interface in java.lang">Cloneable</a>, <a href="../../java/io/Serializable.html" title="interface in java.io">Serializable</a></pre>
  168. <div class="block">A Red-Black tree based <a href="../../java/util/NavigableMap.html" title="interface in java.util"><code>NavigableMap</code></a> implementation.
  169. The map is sorted according to the <a href="../../java/lang/Comparable.html" title="interface in java.lang">natural
  170. ordering</a> of its keys, or by a <a href="../../java/util/Comparator.html" title="interface in java.util"><code>Comparator</code></a> provided at map
  171. creation time, depending on which constructor is used.
  172. <p>This implementation provides guaranteed log(n) time cost for the
  173. <code>containsKey</code>, <code>get</code>, <code>put</code> and <code>remove</code>
  174. operations. Algorithms are adaptations of those in Cormen, Leiserson, and
  175. Rivest's <em>Introduction to Algorithms</em>.
  176. <p>Note that the ordering maintained by a tree map, like any sorted map, and
  177. whether or not an explicit comparator is provided, must be <em>consistent
  178. with <code>equals</code></em> if this sorted map is to correctly implement the
  179. <code>Map</code> interface. (See <code>Comparable</code> or <code>Comparator</code> for a
  180. precise definition of <em>consistent with equals</em>.) This is so because
  181. the <code>Map</code> interface is defined in terms of the <code>equals</code>
  182. operation, but a sorted map performs all key comparisons using its <code>compareTo</code> (or <code>compare</code>) method, so two keys that are deemed equal by
  183. this method are, from the standpoint of the sorted map, equal. The behavior
  184. of a sorted map <em>is</em> well-defined even if its ordering is
  185. inconsistent with <code>equals</code>; it just fails to obey the general contract
  186. of the <code>Map</code> interface.
  187. <p><strong>Note that this implementation is not synchronized.</strong>
  188. If multiple threads access a map concurrently, and at least one of the
  189. threads modifies the map structurally, it <em>must</em> be synchronized
  190. externally. (A structural modification is any operation that adds or
  191. deletes one or more mappings; merely changing the value associated
  192. with an existing key is not a structural modification.) This is
  193. typically accomplished by synchronizing on some object that naturally
  194. encapsulates the map.
  195. If no such object exists, the map should be "wrapped" using the
  196. <a href="../../java/util/Collections.html#synchronizedSortedMap-java.util.SortedMap-"><code>Collections.synchronizedSortedMap</code></a>
  197. method. This is best done at creation time, to prevent accidental
  198. unsynchronized access to the map: <pre>
  199. SortedMap m = Collections.synchronizedSortedMap(new TreeMap(...));</pre>
  200. <p>The iterators returned by the <code>iterator</code> method of the collections
  201. returned by all of this class's "collection view methods" are
  202. <em>fail-fast</em>: if the map is structurally modified at any time after
  203. the iterator is created, in any way except through the iterator's own
  204. <code>remove</code> method, the iterator will throw a <a href="../../java/util/ConcurrentModificationException.html" title="class in java.util"><code>ConcurrentModificationException</code></a>. Thus, in the face of concurrent
  205. modification, the iterator fails quickly and cleanly, rather than risking
  206. arbitrary, non-deterministic behavior at an undetermined time in the future.
  207. <p>Note that the fail-fast behavior of an iterator cannot be guaranteed
  208. as it is, generally speaking, impossible to make any hard guarantees in the
  209. presence of unsynchronized concurrent modification. Fail-fast iterators
  210. throw <code>ConcurrentModificationException</code> on a best-effort basis.
  211. Therefore, it would be wrong to write a program that depended on this
  212. exception for its correctness: <em>the fail-fast behavior of iterators
  213. should be used only to detect bugs.</em>
  214. <p>All <code>Map.Entry</code> pairs returned by methods in this class
  215. and its views represent snapshots of mappings at the time they were
  216. produced. They do <strong>not</strong> support the <code>Entry.setValue</code>
  217. method. (Note however that it is possible to change mappings in the
  218. associated map using <code>put</code>.)
  219. <p>This class is a member of the
  220. <a href="../../../technotes/guides/collections/index.html">
  221. Java Collections Framework</a>.</div>
  222. <dl>
  223. <dt><span class="simpleTagLabel">Since:</span></dt>
  224. <dd>1.2</dd>
  225. <dt><span class="seeLabel">See Also:</span></dt>
  226. <dd><a href="../../java/util/Map.html" title="interface in java.util"><code>Map</code></a>,
  227. <a href="../../java/util/HashMap.html" title="class in java.util"><code>HashMap</code></a>,
  228. <a href="../../java/util/Hashtable.html" title="class in java.util"><code>Hashtable</code></a>,
  229. <a href="../../java/lang/Comparable.html" title="interface in java.lang"><code>Comparable</code></a>,
  230. <a href="../../java/util/Comparator.html" title="interface in java.util"><code>Comparator</code></a>,
  231. <a href="../../java/util/Collection.html" title="interface in java.util"><code>Collection</code></a>,
  232. <a href="../../serialized-form.html#java.util.TreeMap">Serialized Form</a></dd>
  233. </dl>
  234. </li>
  235. </ul>
  236. </div>
  237. <div class="summary">
  238. <ul class="blockList">
  239. <li class="blockList">
  240. <!-- ======== NESTED CLASS SUMMARY ======== -->
  241. <ul class="blockList">
  242. <li class="blockList"><a name="nested.class.summary">
  243. <!-- -->
  244. </a>
  245. <h3>Nested Class Summary</h3>
  246. <ul class="blockList">
  247. <li class="blockList"><a name="nested.classes.inherited.from.class.java.util.AbstractMap">
  248. <!-- -->
  249. </a>
  250. <h3>Nested classes/interfaces inherited from class&nbsp;java.util.<a href="../../java/util/AbstractMap.html" title="class in java.util">AbstractMap</a></h3>
  251. <code><a href="../../java/util/AbstractMap.SimpleEntry.html" title="class in java.util">AbstractMap.SimpleEntry</a>&lt;<a href="../../java/util/AbstractMap.SimpleEntry.html" title="type parameter in AbstractMap.SimpleEntry">K</a>,<a href="../../java/util/AbstractMap.SimpleEntry.html" title="type parameter in AbstractMap.SimpleEntry">V</a>&gt;, <a href="../../java/util/AbstractMap.SimpleImmutableEntry.html" title="class in java.util">AbstractMap.SimpleImmutableEntry</a>&lt;<a href="../../java/util/AbstractMap.SimpleImmutableEntry.html" title="type parameter in AbstractMap.SimpleImmutableEntry">K</a>,<a href="../../java/util/AbstractMap.SimpleImmutableEntry.html" title="type parameter in AbstractMap.SimpleImmutableEntry">V</a>&gt;</code></li>
  252. </ul>
  253. </li>
  254. </ul>
  255. <!-- ======== CONSTRUCTOR SUMMARY ======== -->
  256. <ul class="blockList">
  257. <li class="blockList"><a name="constructor.summary">
  258. <!-- -->
  259. </a>
  260. <h3>Constructor Summary</h3>
  261. <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
  262. <caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
  263. <tr>
  264. <th class="colOne" scope="col">Constructor and Description</th>
  265. </tr>
  266. <tr class="altColor">
  267. <td class="colOne"><code><span class="memberNameLink"><a href="../../java/util/TreeMap.html#TreeMap--">TreeMap</a></span>()</code>
  268. <div class="block">Constructs a new, empty tree map, using the natural ordering of its
  269. keys.</div>
  270. </td>
  271. </tr>
  272. <tr class="rowColor">
  273. <td class="colOne"><code><span class="memberNameLink"><a href="../../java/util/TreeMap.html#TreeMap-java.util.Comparator-">TreeMap</a></span>(<a href="../../java/util/Comparator.html" title="interface in java.util">Comparator</a>&lt;? super <a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>&gt;&nbsp;comparator)</code>
  274. <div class="block">Constructs a new, empty tree map, ordered according to the given
  275. comparator.</div>
  276. </td>
  277. </tr>
  278. <tr class="altColor">
  279. <td class="colOne"><code><span class="memberNameLink"><a href="../../java/util/TreeMap.html#TreeMap-java.util.Map-">TreeMap</a></span>(<a href="../../java/util/Map.html" title="interface in java.util">Map</a>&lt;? extends <a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,? extends <a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;&nbsp;m)</code>
  280. <div class="block">Constructs a new tree map containing the same mappings as the given
  281. map, ordered according to the <em>natural ordering</em> of its keys.</div>
  282. </td>
  283. </tr>
  284. <tr class="rowColor">
  285. <td class="colOne"><code><span class="memberNameLink"><a href="../../java/util/TreeMap.html#TreeMap-java.util.SortedMap-">TreeMap</a></span>(<a href="../../java/util/SortedMap.html" title="interface in java.util">SortedMap</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,? extends <a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;&nbsp;m)</code>
  286. <div class="block">Constructs a new tree map containing the same mappings and
  287. using the same ordering as the specified sorted map.</div>
  288. </td>
  289. </tr>
  290. </table>
  291. </li>
  292. </ul>
  293. <!-- ========== METHOD SUMMARY =========== -->
  294. <ul class="blockList">
  295. <li class="blockList"><a name="method.summary">
  296. <!-- -->
  297. </a>
  298. <h3>Method Summary</h3>
  299. <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
  300. <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
  301. <tr>
  302. <th class="colFirst" scope="col">Modifier and Type</th>
  303. <th class="colLast" scope="col">Method and Description</th>
  304. </tr>
  305. <tr id="i0" class="altColor">
  306. <td class="colFirst"><code><a href="../../java/util/Map.Entry.html" title="interface in java.util">Map.Entry</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></td>
  307. <td class="colLast"><code><span class="memberNameLink"><a href="../../java/util/TreeMap.html#ceilingEntry-K-">ceilingEntry</a></span>(<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>&nbsp;key)</code>
  308. <div class="block">Returns a key-value mapping associated with the least key
  309. greater than or equal to the given key, or <code>null</code> if
  310. there is no such key.</div>
  311. </td>
  312. </tr>
  313. <tr id="i1" class="rowColor">
  314. <td class="colFirst"><code><a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a></code></td>
  315. <td class="colLast"><code><span class="memberNameLink"><a href="../../java/util/TreeMap.html#ceilingKey-K-">ceilingKey</a></span>(<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>&nbsp;key)</code>
  316. <div class="block">Returns the least key greater than or equal to the given key,
  317. or <code>null</code> if there is no such key.</div>
  318. </td>
  319. </tr>
  320. <tr id="i2" class="altColor">
  321. <td class="colFirst"><code>void</code></td>
  322. <td class="colLast"><code><span class="memberNameLink"><a href="../../java/util/TreeMap.html#clear--">clear</a></span>()</code>
  323. <div class="block">Removes all of the mappings from this map.</div>
  324. </td>
  325. </tr>
  326. <tr id="i3" class="rowColor">
  327. <td class="colFirst"><code><a href="../../java/lang/Object.html" title="class in java.lang">Object</a></code></td>
  328. <td class="colLast"><code><span class="memberNameLink"><a href="../../java/util/TreeMap.html#clone--">clone</a></span>()</code>
  329. <div class="block">Returns a shallow copy of this <code>TreeMap</code> instance.</div>
  330. </td>
  331. </tr>
  332. <tr id="i4" class="altColor">
  333. <td class="colFirst"><code><a href="../../java/util/Comparator.html" title="interface in java.util">Comparator</a>&lt;? super <a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>&gt;</code></td>
  334. <td class="colLast"><code><span class="memberNameLink"><a href="../../java/util/TreeMap.html#comparator--">comparator</a></span>()</code>
  335. <div class="block">Returns the comparator used to order the keys in this map, or
  336. <code>null</code> if this map uses the <a href="../../java/lang/Comparable.html" title="interface in java.lang">natural ordering</a> of its keys.</div>
  337. </td>
  338. </tr>
  339. <tr id="i5" class="rowColor">
  340. <td class="colFirst"><code>boolean</code></td>
  341. <td class="colLast"><code><span class="memberNameLink"><a href="../../java/util/TreeMap.html#containsKey-java.lang.Object-">containsKey</a></span>(<a href="../../java/lang/Object.html" title="class in java.lang">Object</a>&nbsp;key)</code>
  342. <div class="block">Returns <code>true</code> if this map contains a mapping for the specified
  343. key.</div>
  344. </td>
  345. </tr>
  346. <tr id="i6" class="altColor">
  347. <td class="colFirst"><code>boolean</code></td>
  348. <td class="colLast"><code><span class="memberNameLink"><a href="../../java/util/TreeMap.html#containsValue-java.lang.Object-">containsValue</a></span>(<a href="../../java/lang/Object.html" title="class in java.lang">Object</a>&nbsp;value)</code>
  349. <div class="block">Returns <code>true</code> if this map maps one or more keys to the
  350. specified value.</div>
  351. </td>
  352. </tr>
  353. <tr id="i7" class="rowColor">
  354. <td class="colFirst"><code><a href="../../java/util/NavigableSet.html" title="interface in java.util">NavigableSet</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>&gt;</code></td>
  355. <td class="colLast"><code><span class="memberNameLink"><a href="../../java/util/TreeMap.html#descendingKeySet--">descendingKeySet</a></span>()</code>
  356. <div class="block">Returns a reverse order <a href="../../java/util/NavigableSet.html" title="interface in java.util"><code>NavigableSet</code></a> view of the keys contained in this map.</div>
  357. </td>
  358. </tr>
  359. <tr id="i8" class="altColor">
  360. <td class="colFirst"><code><a href="../../java/util/NavigableMap.html" title="interface in java.util">NavigableMap</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></td>
  361. <td class="colLast"><code><span class="memberNameLink"><a href="../../java/util/TreeMap.html#descendingMap--">descendingMap</a></span>()</code>
  362. <div class="block">Returns a reverse order view of the mappings contained in this map.</div>
  363. </td>
  364. </tr>
  365. <tr id="i9" class="rowColor">
  366. <td class="colFirst"><code><a href="../../java/util/Set.html" title="interface in java.util">Set</a>&lt;<a href="../../java/util/Map.Entry.html" title="interface in java.util">Map.Entry</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;&gt;</code></td>
  367. <td class="colLast"><code><span class="memberNameLink"><a href="../../java/util/TreeMap.html#entrySet--">entrySet</a></span>()</code>
  368. <div class="block">Returns a <a href="../../java/util/Set.html" title="interface in java.util"><code>Set</code></a> view of the mappings contained in this map.</div>
  369. </td>
  370. </tr>
  371. <tr id="i10" class="altColor">
  372. <td class="colFirst"><code><a href="../../java/util/Map.Entry.html" title="interface in java.util">Map.Entry</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></td>
  373. <td class="colLast"><code><span class="memberNameLink"><a href="../../java/util/TreeMap.html#firstEntry--">firstEntry</a></span>()</code>
  374. <div class="block">Returns a key-value mapping associated with the least
  375. key in this map, or <code>null</code> if the map is empty.</div>
  376. </td>
  377. </tr>
  378. <tr id="i11" class="rowColor">
  379. <td class="colFirst"><code><a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a></code></td>
  380. <td class="colLast"><code><span class="memberNameLink"><a href="../../java/util/TreeMap.html#firstKey--">firstKey</a></span>()</code>
  381. <div class="block">Returns the first (lowest) key currently in this map.</div>
  382. </td>
  383. </tr>
  384. <tr id="i12" class="altColor">
  385. <td class="colFirst"><code><a href="../../java/util/Map.Entry.html" title="interface in java.util">Map.Entry</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></td>
  386. <td class="colLast"><code><span class="memberNameLink"><a href="../../java/util/TreeMap.html#floorEntry-K-">floorEntry</a></span>(<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>&nbsp;key)</code>
  387. <div class="block">Returns a key-value mapping associated with the greatest key
  388. less than or equal to the given key, or <code>null</code> if there
  389. is no such key.</div>
  390. </td>
  391. </tr>
  392. <tr id="i13" class="rowColor">
  393. <td class="colFirst"><code><a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a></code></td>
  394. <td class="colLast"><code><span class="memberNameLink"><a href="../../java/util/TreeMap.html#floorKey-K-">floorKey</a></span>(<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>&nbsp;key)</code>
  395. <div class="block">Returns the greatest key less than or equal to the given key,
  396. or <code>null</code> if there is no such key.</div>
  397. </td>
  398. </tr>
  399. <tr id="i14" class="altColor">
  400. <td class="colFirst"><code>void</code></td>
  401. <td class="colLast"><code><span class="memberNameLink"><a href="../../java/util/TreeMap.html#forEach-java.util.function.BiConsumer-">forEach</a></span>(<a href="../../java/util/function/BiConsumer.html" title="interface in java.util.function">BiConsumer</a>&lt;? super <a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,? super <a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;&nbsp;action)</code>
  402. <div class="block">Performs the given action for each entry in this map until all entries
  403. have been processed or the action throws an exception.</div>
  404. </td>
  405. </tr>
  406. <tr id="i15" class="rowColor">
  407. <td class="colFirst"><code><a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a></code></td>
  408. <td class="colLast"><code><span class="memberNameLink"><a href="../../java/util/TreeMap.html#get-java.lang.Object-">get</a></span>(<a href="../../java/lang/Object.html" title="class in java.lang">Object</a>&nbsp;key)</code>
  409. <div class="block">Returns the value to which the specified key is mapped,
  410. or <code>null</code> if this map contains no mapping for the key.</div>
  411. </td>
  412. </tr>
  413. <tr id="i16" class="altColor">
  414. <td class="colFirst"><code><a href="../../java/util/SortedMap.html" title="interface in java.util">SortedMap</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></td>
  415. <td class="colLast"><code><span class="memberNameLink"><a href="../../java/util/TreeMap.html#headMap-K-">headMap</a></span>(<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>&nbsp;toKey)</code>
  416. <div class="block">Returns a view of the portion of this map whose keys are
  417. strictly less than <code>toKey</code>.</div>
  418. </td>
  419. </tr>
  420. <tr id="i17" class="rowColor">
  421. <td class="colFirst"><code><a href="../../java/util/NavigableMap.html" title="interface in java.util">NavigableMap</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></td>
  422. <td class="colLast"><code><span class="memberNameLink"><a href="../../java/util/TreeMap.html#headMap-K-boolean-">headMap</a></span>(<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>&nbsp;toKey,
  423. boolean&nbsp;inclusive)</code>
  424. <div class="block">Returns a view of the portion of this map whose keys are less than (or
  425. equal to, if <code>inclusive</code> is true) <code>toKey</code>.</div>
  426. </td>
  427. </tr>
  428. <tr id="i18" class="altColor">
  429. <td class="colFirst"><code><a href="../../java/util/Map.Entry.html" title="interface in java.util">Map.Entry</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></td>
  430. <td class="colLast"><code><span class="memberNameLink"><a href="../../java/util/TreeMap.html#higherEntry-K-">higherEntry</a></span>(<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>&nbsp;key)</code>
  431. <div class="block">Returns a key-value mapping associated with the least key
  432. strictly greater than the given key, or <code>null</code> if there
  433. is no such key.</div>
  434. </td>
  435. </tr>
  436. <tr id="i19" class="rowColor">
  437. <td class="colFirst"><code><a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a></code></td>
  438. <td class="colLast"><code><span class="memberNameLink"><a href="../../java/util/TreeMap.html#higherKey-K-">higherKey</a></span>(<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>&nbsp;key)</code>
  439. <div class="block">Returns the least key strictly greater than the given key, or
  440. <code>null</code> if there is no such key.</div>
  441. </td>
  442. </tr>
  443. <tr id="i20" class="altColor">
  444. <td class="colFirst"><code><a href="../../java/util/Set.html" title="interface in java.util">Set</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>&gt;</code></td>
  445. <td class="colLast"><code><span class="memberNameLink"><a href="../../java/util/TreeMap.html#keySet--">keySet</a></span>()</code>
  446. <div class="block">Returns a <a href="../../java/util/Set.html" title="interface in java.util"><code>Set</code></a> view of the keys contained in this map.</div>
  447. </td>
  448. </tr>
  449. <tr id="i21" class="rowColor">
  450. <td class="colFirst"><code><a href="../../java/util/Map.Entry.html" title="interface in java.util">Map.Entry</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></td>
  451. <td class="colLast"><code><span class="memberNameLink"><a href="../../java/util/TreeMap.html#lastEntry--">lastEntry</a></span>()</code>
  452. <div class="block">Returns a key-value mapping associated with the greatest
  453. key in this map, or <code>null</code> if the map is empty.</div>
  454. </td>
  455. </tr>
  456. <tr id="i22" class="altColor">
  457. <td class="colFirst"><code><a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a></code></td>
  458. <td class="colLast"><code><span class="memberNameLink"><a href="../../java/util/TreeMap.html#lastKey--">lastKey</a></span>()</code>
  459. <div class="block">Returns the last (highest) key currently in this map.</div>
  460. </td>
  461. </tr>
  462. <tr id="i23" class="rowColor">
  463. <td class="colFirst"><code><a href="../../java/util/Map.Entry.html" title="interface in java.util">Map.Entry</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></td>
  464. <td class="colLast"><code><span class="memberNameLink"><a href="../../java/util/TreeMap.html#lowerEntry-K-">lowerEntry</a></span>(<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>&nbsp;key)</code>
  465. <div class="block">Returns a key-value mapping associated with the greatest key
  466. strictly less than the given key, or <code>null</code> if there is
  467. no such key.</div>
  468. </td>
  469. </tr>
  470. <tr id="i24" class="altColor">
  471. <td class="colFirst"><code><a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a></code></td>
  472. <td class="colLast"><code><span class="memberNameLink"><a href="../../java/util/TreeMap.html#lowerKey-K-">lowerKey</a></span>(<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>&nbsp;key)</code>
  473. <div class="block">Returns the greatest key strictly less than the given key, or
  474. <code>null</code> if there is no such key.</div>
  475. </td>
  476. </tr>
  477. <tr id="i25" class="rowColor">
  478. <td class="colFirst"><code><a href="../../java/util/NavigableSet.html" title="interface in java.util">NavigableSet</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>&gt;</code></td>
  479. <td class="colLast"><code><span class="memberNameLink"><a href="../../java/util/TreeMap.html#navigableKeySet--">navigableKeySet</a></span>()</code>
  480. <div class="block">Returns a <a href="../../java/util/NavigableSet.html" title="interface in java.util"><code>NavigableSet</code></a> view of the keys contained in this map.</div>
  481. </td>
  482. </tr>
  483. <tr id="i26" class="altColor">
  484. <td class="colFirst"><code><a href="../../java/util/Map.Entry.html" title="interface in java.util">Map.Entry</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></td>
  485. <td class="colLast"><code><span class="memberNameLink"><a href="../../java/util/TreeMap.html#pollFirstEntry--">pollFirstEntry</a></span>()</code>
  486. <div class="block">Removes and returns a key-value mapping associated with
  487. the least key in this map, or <code>null</code> if the map is empty.</div>
  488. </td>
  489. </tr>
  490. <tr id="i27" class="rowColor">
  491. <td class="colFirst"><code><a href="../../java/util/Map.Entry.html" title="interface in java.util">Map.Entry</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></td>
  492. <td class="colLast"><code><span class="memberNameLink"><a href="../../java/util/TreeMap.html#pollLastEntry--">pollLastEntry</a></span>()</code>
  493. <div class="block">Removes and returns a key-value mapping associated with
  494. the greatest key in this map, or <code>null</code> if the map is empty.</div>
  495. </td>
  496. </tr>
  497. <tr id="i28" class="altColor">
  498. <td class="colFirst"><code><a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a></code></td>
  499. <td class="colLast"><code><span class="memberNameLink"><a href="../../java/util/TreeMap.html#put-K-V-">put</a></span>(<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>&nbsp;key,
  500. <a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&nbsp;value)</code>
  501. <div class="block">Associates the specified value with the specified key in this map.</div>
  502. </td>
  503. </tr>
  504. <tr id="i29" class="rowColor">
  505. <td class="colFirst"><code>void</code></td>
  506. <td class="colLast"><code><span class="memberNameLink"><a href="../../java/util/TreeMap.html#putAll-java.util.Map-">putAll</a></span>(<a href="../../java/util/Map.html" title="interface in java.util">Map</a>&lt;? extends <a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,? extends <a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;&nbsp;map)</code>
  507. <div class="block">Copies all of the mappings from the specified map to this map.</div>
  508. </td>
  509. </tr>
  510. <tr id="i30" class="altColor">
  511. <td class="colFirst"><code><a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a></code></td>
  512. <td class="colLast"><code><span class="memberNameLink"><a href="../../java/util/TreeMap.html#remove-java.lang.Object-">remove</a></span>(<a href="../../java/lang/Object.html" title="class in java.lang">Object</a>&nbsp;key)</code>
  513. <div class="block">Removes the mapping for this key from this TreeMap if present.</div>
  514. </td>
  515. </tr>
  516. <tr id="i31" class="rowColor">
  517. <td class="colFirst"><code><a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a></code></td>
  518. <td class="colLast"><code><span class="memberNameLink"><a href="../../java/util/TreeMap.html#replace-K-V-">replace</a></span>(<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>&nbsp;key,
  519. <a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&nbsp;value)</code>
  520. <div class="block">Replaces the entry for the specified key only if it is
  521. currently mapped to some value.</div>
  522. </td>
  523. </tr>
  524. <tr id="i32" class="altColor">
  525. <td class="colFirst"><code>boolean</code></td>
  526. <td class="colLast"><code><span class="memberNameLink"><a href="../../java/util/TreeMap.html#replace-K-V-V-">replace</a></span>(<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>&nbsp;key,
  527. <a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&nbsp;oldValue,
  528. <a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&nbsp;newValue)</code>
  529. <div class="block">Replaces the entry for the specified key only if currently
  530. mapped to the specified value.</div>
  531. </td>
  532. </tr>
  533. <tr id="i33" class="rowColor">
  534. <td class="colFirst"><code>void</code></td>
  535. <td class="colLast"><code><span class="memberNameLink"><a href="../../java/util/TreeMap.html#replaceAll-java.util.function.BiFunction-">replaceAll</a></span>(<a href="../../java/util/function/BiFunction.html" title="interface in java.util.function">BiFunction</a>&lt;? super <a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,? super <a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>,? extends <a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;&nbsp;function)</code>
  536. <div class="block">Replaces each entry's value with the result of invoking the given
  537. function on that entry until all entries have been processed or the
  538. function throws an exception.</div>
  539. </td>
  540. </tr>
  541. <tr id="i34" class="altColor">
  542. <td class="colFirst"><code>int</code></td>
  543. <td class="colLast"><code><span class="memberNameLink"><a href="../../java/util/TreeMap.html#size--">size</a></span>()</code>
  544. <div class="block">Returns the number of key-value mappings in this map.</div>
  545. </td>
  546. </tr>
  547. <tr id="i35" class="rowColor">
  548. <td class="colFirst"><code><a href="../../java/util/NavigableMap.html" title="interface in java.util">NavigableMap</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></td>
  549. <td class="colLast"><code><span class="memberNameLink"><a href="../../java/util/TreeMap.html#subMap-K-boolean-K-boolean-">subMap</a></span>(<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>&nbsp;fromKey,
  550. boolean&nbsp;fromInclusive,
  551. <a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>&nbsp;toKey,
  552. boolean&nbsp;toInclusive)</code>
  553. <div class="block">Returns a view of the portion of this map whose keys range from
  554. <code>fromKey</code> to <code>toKey</code>.</div>
  555. </td>
  556. </tr>
  557. <tr id="i36" class="altColor">
  558. <td class="colFirst"><code><a href="../../java/util/SortedMap.html" title="interface in java.util">SortedMap</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></td>
  559. <td class="colLast"><code><span class="memberNameLink"><a href="../../java/util/TreeMap.html#subMap-K-K-">subMap</a></span>(<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>&nbsp;fromKey,
  560. <a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>&nbsp;toKey)</code>
  561. <div class="block">Returns a view of the portion of this map whose keys range from
  562. <code>fromKey</code>, inclusive, to <code>toKey</code>, exclusive.</div>
  563. </td>
  564. </tr>
  565. <tr id="i37" class="rowColor">
  566. <td class="colFirst"><code><a href="../../java/util/SortedMap.html" title="interface in java.util">SortedMap</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></td>
  567. <td class="colLast"><code><span class="memberNameLink"><a href="../../java/util/TreeMap.html#tailMap-K-">tailMap</a></span>(<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>&nbsp;fromKey)</code>
  568. <div class="block">Returns a view of the portion of this map whose keys are
  569. greater than or equal to <code>fromKey</code>.</div>
  570. </td>
  571. </tr>
  572. <tr id="i38" class="altColor">
  573. <td class="colFirst"><code><a href="../../java/util/NavigableMap.html" title="interface in java.util">NavigableMap</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></td>
  574. <td class="colLast"><code><span class="memberNameLink"><a href="../../java/util/TreeMap.html#tailMap-K-boolean-">tailMap</a></span>(<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>&nbsp;fromKey,
  575. boolean&nbsp;inclusive)</code>
  576. <div class="block">Returns a view of the portion of this map whose keys are greater than (or
  577. equal to, if <code>inclusive</code> is true) <code>fromKey</code>.</div>
  578. </td>
  579. </tr>
  580. <tr id="i39" class="rowColor">
  581. <td class="colFirst"><code><a href="../../java/util/Collection.html" title="interface in java.util">Collection</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></td>
  582. <td class="colLast"><code><span class="memberNameLink"><a href="../../java/util/TreeMap.html#values--">values</a></span>()</code>
  583. <div class="block">Returns a <a href="../../java/util/Collection.html" title="interface in java.util"><code>Collection</code></a> view of the values contained in this map.</div>
  584. </td>
  585. </tr>
  586. </table>
  587. <ul class="blockList">
  588. <li class="blockList"><a name="methods.inherited.from.class.java.util.AbstractMap">
  589. <!-- -->
  590. </a>
  591. <h3>Methods inherited from class&nbsp;java.util.<a href="../../java/util/AbstractMap.html" title="class in java.util">AbstractMap</a></h3>
  592. <code><a href="../../java/util/AbstractMap.html#equals-java.lang.Object-">equals</a>, <a href="../../java/util/AbstractMap.html#hashCode--">hashCode</a>, <a href="../../java/util/AbstractMap.html#isEmpty--">isEmpty</a>, <a href="../../java/util/AbstractMap.html#toString--">toString</a></code></li>
  593. </ul>
  594. <ul class="blockList">
  595. <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
  596. <!-- -->
  597. </a>
  598. <h3>Methods inherited from class&nbsp;java.lang.<a href="../../java/lang/Object.html" title="class in java.lang">Object</a></h3>
  599. <code><a href="../../java/lang/Object.html#finalize--">finalize</a>, <a href="../../java/lang/Object.html#getClass--">getClass</a>, <a href="../../java/lang/Object.html#notify--">notify</a>, <a href="../../java/lang/Object.html#notifyAll--">notifyAll</a>, <a href="../../java/lang/Object.html#wait--">wait</a>, <a href="../../java/lang/Object.html#wait-long-">wait</a>, <a href="../../java/lang/Object.html#wait-long-int-">wait</a></code></li>
  600. </ul>
  601. <ul class="blockList">
  602. <li class="blockList"><a name="methods.inherited.from.class.java.util.Map">
  603. <!-- -->
  604. </a>
  605. <h3>Methods inherited from interface&nbsp;java.util.<a href="../../java/util/Map.html" title="interface in java.util">Map</a></h3>
  606. <code><a href="../../java/util/Map.html#compute-K-java.util.function.BiFunction-">compute</a>, <a href="../../java/util/Map.html#computeIfAbsent-K-java.util.function.Function-">computeIfAbsent</a>, <a href="../../java/util/Map.html#computeIfPresent-K-java.util.function.BiFunction-">computeIfPresent</a>, <a href="../../java/util/Map.html#equals-java.lang.Object-">equals</a>, <a href="../../java/util/Map.html#getOrDefault-java.lang.Object-V-">getOrDefault</a>, <a href="../../java/util/Map.html#hashCode--">hashCode</a>, <a href="../../java/util/Map.html#isEmpty--">isEmpty</a>, <a href="../../java/util/Map.html#merge-K-V-java.util.function.BiFunction-">merge</a>, <a href="../../java/util/Map.html#putIfAbsent-K-V-">putIfAbsent</a>, <a href="../../java/util/Map.html#remove-java.lang.Object-java.lang.Object-">remove</a></code></li>
  607. </ul>
  608. </li>
  609. </ul>
  610. </li>
  611. </ul>
  612. </div>
  613. <div class="details">
  614. <ul class="blockList">
  615. <li class="blockList">
  616. <!-- ========= CONSTRUCTOR DETAIL ======== -->
  617. <ul class="blockList">
  618. <li class="blockList"><a name="constructor.detail">
  619. <!-- -->
  620. </a>
  621. <h3>Constructor Detail</h3>
  622. <a name="TreeMap--">
  623. <!-- -->
  624. </a>
  625. <ul class="blockList">
  626. <li class="blockList">
  627. <h4>TreeMap</h4>
  628. <pre>public&nbsp;TreeMap()</pre>
  629. <div class="block">Constructs a new, empty tree map, using the natural ordering of its
  630. keys. All keys inserted into the map must implement the <a href="../../java/lang/Comparable.html" title="interface in java.lang"><code>Comparable</code></a> interface. Furthermore, all such keys must be
  631. <em>mutually comparable</em>: <code>k1.compareTo(k2)</code> must not throw
  632. a <code>ClassCastException</code> for any keys <code>k1</code> and
  633. <code>k2</code> in the map. If the user attempts to put a key into the
  634. map that violates this constraint (for example, the user attempts to
  635. put a string key into a map whose keys are integers), the
  636. <code>put(Object key, Object value)</code> call will throw a
  637. <code>ClassCastException</code>.</div>
  638. </li>
  639. </ul>
  640. <a name="TreeMap-java.util.Comparator-">
  641. <!-- -->
  642. </a>
  643. <ul class="blockList">
  644. <li class="blockList">
  645. <h4>TreeMap</h4>
  646. <pre>public&nbsp;TreeMap(<a href="../../java/util/Comparator.html" title="interface in java.util">Comparator</a>&lt;? super <a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>&gt;&nbsp;comparator)</pre>
  647. <div class="block">Constructs a new, empty tree map, ordered according to the given
  648. comparator. All keys inserted into the map must be <em>mutually
  649. comparable</em> by the given comparator: <code>comparator.compare(k1,
  650. k2)</code> must not throw a <code>ClassCastException</code> for any keys
  651. <code>k1</code> and <code>k2</code> in the map. If the user attempts to put
  652. a key into the map that violates this constraint, the <code>put(Object
  653. key, Object value)</code> call will throw a
  654. <code>ClassCastException</code>.</div>
  655. <dl>
  656. <dt><span class="paramLabel">Parameters:</span></dt>
  657. <dd><code>comparator</code> - the comparator that will be used to order this map.
  658. If <code>null</code>, the <a href="../../java/lang/Comparable.html" title="interface in java.lang">natural
  659. ordering</a> of the keys will be used.</dd>
  660. </dl>
  661. </li>
  662. </ul>
  663. <a name="TreeMap-java.util.Map-">
  664. <!-- -->
  665. </a>
  666. <ul class="blockList">
  667. <li class="blockList">
  668. <h4>TreeMap</h4>
  669. <pre>public&nbsp;TreeMap(<a href="../../java/util/Map.html" title="interface in java.util">Map</a>&lt;? extends <a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,? extends <a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;&nbsp;m)</pre>
  670. <div class="block">Constructs a new tree map containing the same mappings as the given
  671. map, ordered according to the <em>natural ordering</em> of its keys.
  672. All keys inserted into the new map must implement the <a href="../../java/lang/Comparable.html" title="interface in java.lang"><code>Comparable</code></a> interface. Furthermore, all such keys must be
  673. <em>mutually comparable</em>: <code>k1.compareTo(k2)</code> must not throw
  674. a <code>ClassCastException</code> for any keys <code>k1</code> and
  675. <code>k2</code> in the map. This method runs in n*log(n) time.</div>
  676. <dl>
  677. <dt><span class="paramLabel">Parameters:</span></dt>
  678. <dd><code>m</code> - the map whose mappings are to be placed in this map</dd>
  679. <dt><span class="throwsLabel">Throws:</span></dt>
  680. <dd><code><a href="../../java/lang/ClassCastException.html" title="class in java.lang">ClassCastException</a></code> - if the keys in m are not <a href="../../java/lang/Comparable.html" title="interface in java.lang"><code>Comparable</code></a>,
  681. or are not mutually comparable</dd>
  682. <dd><code><a href="../../java/lang/NullPointerException.html" title="class in java.lang">NullPointerException</a></code> - if the specified map is null</dd>
  683. </dl>
  684. </li>
  685. </ul>
  686. <a name="TreeMap-java.util.SortedMap-">
  687. <!-- -->
  688. </a>
  689. <ul class="blockListLast">
  690. <li class="blockList">
  691. <h4>TreeMap</h4>
  692. <pre>public&nbsp;TreeMap(<a href="../../java/util/SortedMap.html" title="interface in java.util">SortedMap</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,? extends <a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;&nbsp;m)</pre>
  693. <div class="block">Constructs a new tree map containing the same mappings and
  694. using the same ordering as the specified sorted map. This
  695. method runs in linear time.</div>
  696. <dl>
  697. <dt><span class="paramLabel">Parameters:</span></dt>
  698. <dd><code>m</code> - the sorted map whose mappings are to be placed in this map,
  699. and whose comparator is to be used to sort this map</dd>
  700. <dt><span class="throwsLabel">Throws:</span></dt>
  701. <dd><code><a href="../../java/lang/NullPointerException.html" title="class in java.lang">NullPointerException</a></code> - if the specified map is null</dd>
  702. </dl>
  703. </li>
  704. </ul>
  705. </li>
  706. </ul>
  707. <!-- ============ METHOD DETAIL ========== -->
  708. <ul class="blockList">
  709. <li class="blockList"><a name="method.detail">
  710. <!-- -->
  711. </a>
  712. <h3>Method Detail</h3>
  713. <a name="size--">
  714. <!-- -->
  715. </a>
  716. <ul class="blockList">
  717. <li class="blockList">
  718. <h4>size</h4>
  719. <pre>public&nbsp;int&nbsp;size()</pre>
  720. <div class="block">Returns the number of key-value mappings in this map.</div>
  721. <dl>
  722. <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
  723. <dd><code><a href="../../java/util/Map.html#size--">size</a></code>&nbsp;in interface&nbsp;<code><a href="../../java/util/Map.html" title="interface in java.util">Map</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></dd>
  724. <dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
  725. <dd><code><a href="../../java/util/AbstractMap.html#size--">size</a></code>&nbsp;in class&nbsp;<code><a href="../../java/util/AbstractMap.html" title="class in java.util">AbstractMap</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></dd>
  726. <dt><span class="returnLabel">Returns:</span></dt>
  727. <dd>the number of key-value mappings in this map</dd>
  728. </dl>
  729. </li>
  730. </ul>
  731. <a name="containsKey-java.lang.Object-">
  732. <!-- -->
  733. </a>
  734. <ul class="blockList">
  735. <li class="blockList">
  736. <h4>containsKey</h4>
  737. <pre>public&nbsp;boolean&nbsp;containsKey(<a href="../../java/lang/Object.html" title="class in java.lang">Object</a>&nbsp;key)</pre>
  738. <div class="block">Returns <code>true</code> if this map contains a mapping for the specified
  739. key.</div>
  740. <dl>
  741. <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
  742. <dd><code><a href="../../java/util/Map.html#containsKey-java.lang.Object-">containsKey</a></code>&nbsp;in interface&nbsp;<code><a href="../../java/util/Map.html" title="interface in java.util">Map</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></dd>
  743. <dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
  744. <dd><code><a href="../../java/util/AbstractMap.html#containsKey-java.lang.Object-">containsKey</a></code>&nbsp;in class&nbsp;<code><a href="../../java/util/AbstractMap.html" title="class in java.util">AbstractMap</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></dd>
  745. <dt><span class="paramLabel">Parameters:</span></dt>
  746. <dd><code>key</code> - key whose presence in this map is to be tested</dd>
  747. <dt><span class="returnLabel">Returns:</span></dt>
  748. <dd><code>true</code> if this map contains a mapping for the
  749. specified key</dd>
  750. <dt><span class="throwsLabel">Throws:</span></dt>
  751. <dd><code><a href="../../java/lang/ClassCastException.html" title="class in java.lang">ClassCastException</a></code> - if the specified key cannot be compared
  752. with the keys currently in the map</dd>
  753. <dd><code><a href="../../java/lang/NullPointerException.html" title="class in java.lang">NullPointerException</a></code> - if the specified key is null
  754. and this map uses natural ordering, or its comparator
  755. does not permit null keys</dd>
  756. </dl>
  757. </li>
  758. </ul>
  759. <a name="containsValue-java.lang.Object-">
  760. <!-- -->
  761. </a>
  762. <ul class="blockList">
  763. <li class="blockList">
  764. <h4>containsValue</h4>
  765. <pre>public&nbsp;boolean&nbsp;containsValue(<a href="../../java/lang/Object.html" title="class in java.lang">Object</a>&nbsp;value)</pre>
  766. <div class="block">Returns <code>true</code> if this map maps one or more keys to the
  767. specified value. More formally, returns <code>true</code> if and only if
  768. this map contains at least one mapping to a value <code>v</code> such
  769. that <code>(value==null ? v==null : value.equals(v))</code>. This
  770. operation will probably require time linear in the map size for
  771. most implementations.</div>
  772. <dl>
  773. <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
  774. <dd><code><a href="../../java/util/Map.html#containsValue-java.lang.Object-">containsValue</a></code>&nbsp;in interface&nbsp;<code><a href="../../java/util/Map.html" title="interface in java.util">Map</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></dd>
  775. <dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
  776. <dd><code><a href="../../java/util/AbstractMap.html#containsValue-java.lang.Object-">containsValue</a></code>&nbsp;in class&nbsp;<code><a href="../../java/util/AbstractMap.html" title="class in java.util">AbstractMap</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></dd>
  777. <dt><span class="paramLabel">Parameters:</span></dt>
  778. <dd><code>value</code> - value whose presence in this map is to be tested</dd>
  779. <dt><span class="returnLabel">Returns:</span></dt>
  780. <dd><code>true</code> if a mapping to <code>value</code> exists;
  781. <code>false</code> otherwise</dd>
  782. <dt><span class="simpleTagLabel">Since:</span></dt>
  783. <dd>1.2</dd>
  784. </dl>
  785. </li>
  786. </ul>
  787. <a name="get-java.lang.Object-">
  788. <!-- -->
  789. </a>
  790. <ul class="blockList">
  791. <li class="blockList">
  792. <h4>get</h4>
  793. <pre>public&nbsp;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&nbsp;get(<a href="../../java/lang/Object.html" title="class in java.lang">Object</a>&nbsp;key)</pre>
  794. <div class="block">Returns the value to which the specified key is mapped,
  795. or <code>null</code> if this map contains no mapping for the key.
  796. <p>More formally, if this map contains a mapping from a key
  797. <code>k</code> to a value <code>v</code> such that <code>key</code> compares
  798. equal to <code>k</code> according to the map's ordering, then this
  799. method returns <code>v</code>; otherwise it returns <code>null</code>.
  800. (There can be at most one such mapping.)
  801. <p>A return value of <code>null</code> does not <em>necessarily</em>
  802. indicate that the map contains no mapping for the key; it's also
  803. possible that the map explicitly maps the key to <code>null</code>.
  804. The <a href="../../java/util/TreeMap.html#containsKey-java.lang.Object-"><code>containsKey</code></a> operation may be used to
  805. distinguish these two cases.</div>
  806. <dl>
  807. <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
  808. <dd><code><a href="../../java/util/Map.html#get-java.lang.Object-">get</a></code>&nbsp;in interface&nbsp;<code><a href="../../java/util/Map.html" title="interface in java.util">Map</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></dd>
  809. <dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
  810. <dd><code><a href="../../java/util/AbstractMap.html#get-java.lang.Object-">get</a></code>&nbsp;in class&nbsp;<code><a href="../../java/util/AbstractMap.html" title="class in java.util">AbstractMap</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></dd>
  811. <dt><span class="paramLabel">Parameters:</span></dt>
  812. <dd><code>key</code> - the key whose associated value is to be returned</dd>
  813. <dt><span class="returnLabel">Returns:</span></dt>
  814. <dd>the value to which the specified key is mapped, or
  815. <code>null</code> if this map contains no mapping for the key</dd>
  816. <dt><span class="throwsLabel">Throws:</span></dt>
  817. <dd><code><a href="../../java/lang/ClassCastException.html" title="class in java.lang">ClassCastException</a></code> - if the specified key cannot be compared
  818. with the keys currently in the map</dd>
  819. <dd><code><a href="../../java/lang/NullPointerException.html" title="class in java.lang">NullPointerException</a></code> - if the specified key is null
  820. and this map uses natural ordering, or its comparator
  821. does not permit null keys</dd>
  822. </dl>
  823. </li>
  824. </ul>
  825. <a name="comparator--">
  826. <!-- -->
  827. </a>
  828. <ul class="blockList">
  829. <li class="blockList">
  830. <h4>comparator</h4>
  831. <pre>public&nbsp;<a href="../../java/util/Comparator.html" title="interface in java.util">Comparator</a>&lt;? super <a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>&gt;&nbsp;comparator()</pre>
  832. <div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../java/util/SortedMap.html#comparator--">SortedMap</a></code></span></div>
  833. <div class="block">Returns the comparator used to order the keys in this map, or
  834. <code>null</code> if this map uses the <a href="../../java/lang/Comparable.html" title="interface in java.lang">natural ordering</a> of its keys.</div>
  835. <dl>
  836. <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
  837. <dd><code><a href="../../java/util/SortedMap.html#comparator--">comparator</a></code>&nbsp;in interface&nbsp;<code><a href="../../java/util/SortedMap.html" title="interface in java.util">SortedMap</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></dd>
  838. <dt><span class="returnLabel">Returns:</span></dt>
  839. <dd>the comparator used to order the keys in this map,
  840. or <code>null</code> if this map uses the natural ordering
  841. of its keys</dd>
  842. </dl>
  843. </li>
  844. </ul>
  845. <a name="firstKey--">
  846. <!-- -->
  847. </a>
  848. <ul class="blockList">
  849. <li class="blockList">
  850. <h4>firstKey</h4>
  851. <pre>public&nbsp;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>&nbsp;firstKey()</pre>
  852. <div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../java/util/SortedMap.html#firstKey--">SortedMap</a></code></span></div>
  853. <div class="block">Returns the first (lowest) key currently in this map.</div>
  854. <dl>
  855. <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
  856. <dd><code><a href="../../java/util/SortedMap.html#firstKey--">firstKey</a></code>&nbsp;in interface&nbsp;<code><a href="../../java/util/SortedMap.html" title="interface in java.util">SortedMap</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></dd>
  857. <dt><span class="returnLabel">Returns:</span></dt>
  858. <dd>the first (lowest) key currently in this map</dd>
  859. <dt><span class="throwsLabel">Throws:</span></dt>
  860. <dd><code><a href="../../java/util/NoSuchElementException.html" title="class in java.util">NoSuchElementException</a></code> - if this map is empty</dd>
  861. </dl>
  862. </li>
  863. </ul>
  864. <a name="lastKey--">
  865. <!-- -->
  866. </a>
  867. <ul class="blockList">
  868. <li class="blockList">
  869. <h4>lastKey</h4>
  870. <pre>public&nbsp;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>&nbsp;lastKey()</pre>
  871. <div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../java/util/SortedMap.html#lastKey--">SortedMap</a></code></span></div>
  872. <div class="block">Returns the last (highest) key currently in this map.</div>
  873. <dl>
  874. <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
  875. <dd><code><a href="../../java/util/SortedMap.html#lastKey--">lastKey</a></code>&nbsp;in interface&nbsp;<code><a href="../../java/util/SortedMap.html" title="interface in java.util">SortedMap</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></dd>
  876. <dt><span class="returnLabel">Returns:</span></dt>
  877. <dd>the last (highest) key currently in this map</dd>
  878. <dt><span class="throwsLabel">Throws:</span></dt>
  879. <dd><code><a href="../../java/util/NoSuchElementException.html" title="class in java.util">NoSuchElementException</a></code> - if this map is empty</dd>
  880. </dl>
  881. </li>
  882. </ul>
  883. <a name="putAll-java.util.Map-">
  884. <!-- -->
  885. </a>
  886. <ul class="blockList">
  887. <li class="blockList">
  888. <h4>putAll</h4>
  889. <pre>public&nbsp;void&nbsp;putAll(<a href="../../java/util/Map.html" title="interface in java.util">Map</a>&lt;? extends <a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,? extends <a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;&nbsp;map)</pre>
  890. <div class="block">Copies all of the mappings from the specified map to this map.
  891. These mappings replace any mappings that this map had for any
  892. of the keys currently in the specified map.</div>
  893. <dl>
  894. <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
  895. <dd><code><a href="../../java/util/Map.html#putAll-java.util.Map-">putAll</a></code>&nbsp;in interface&nbsp;<code><a href="../../java/util/Map.html" title="interface in java.util">Map</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></dd>
  896. <dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
  897. <dd><code><a href="../../java/util/AbstractMap.html#putAll-java.util.Map-">putAll</a></code>&nbsp;in class&nbsp;<code><a href="../../java/util/AbstractMap.html" title="class in java.util">AbstractMap</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></dd>
  898. <dt><span class="paramLabel">Parameters:</span></dt>
  899. <dd><code>map</code> - mappings to be stored in this map</dd>
  900. <dt><span class="throwsLabel">Throws:</span></dt>
  901. <dd><code><a href="../../java/lang/ClassCastException.html" title="class in java.lang">ClassCastException</a></code> - if the class of a key or value in
  902. the specified map prevents it from being stored in this map</dd>
  903. <dd><code><a href="../../java/lang/NullPointerException.html" title="class in java.lang">NullPointerException</a></code> - if the specified map is null or
  904. the specified map contains a null key and this map does not
  905. permit null keys</dd>
  906. </dl>
  907. </li>
  908. </ul>
  909. <a name="put-java.lang.Object-java.lang.Object-">
  910. <!-- -->
  911. </a><a name="put-K-V-">
  912. <!-- -->
  913. </a>
  914. <ul class="blockList">
  915. <li class="blockList">
  916. <h4>put</h4>
  917. <pre>public&nbsp;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&nbsp;put(<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>&nbsp;key,
  918. <a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&nbsp;value)</pre>
  919. <div class="block">Associates the specified value with the specified key in this map.
  920. If the map previously contained a mapping for the key, the old
  921. value is replaced.</div>
  922. <dl>
  923. <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
  924. <dd><code><a href="../../java/util/Map.html#put-K-V-">put</a></code>&nbsp;in interface&nbsp;<code><a href="../../java/util/Map.html" title="interface in java.util">Map</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></dd>
  925. <dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
  926. <dd><code><a href="../../java/util/AbstractMap.html#put-K-V-">put</a></code>&nbsp;in class&nbsp;<code><a href="../../java/util/AbstractMap.html" title="class in java.util">AbstractMap</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></dd>
  927. <dt><span class="paramLabel">Parameters:</span></dt>
  928. <dd><code>key</code> - key with which the specified value is to be associated</dd>
  929. <dd><code>value</code> - value to be associated with the specified key</dd>
  930. <dt><span class="returnLabel">Returns:</span></dt>
  931. <dd>the previous value associated with <code>key</code>, or
  932. <code>null</code> if there was no mapping for <code>key</code>.
  933. (A <code>null</code> return can also indicate that the map
  934. previously associated <code>null</code> with <code>key</code>.)</dd>
  935. <dt><span class="throwsLabel">Throws:</span></dt>
  936. <dd><code><a href="../../java/lang/ClassCastException.html" title="class in java.lang">ClassCastException</a></code> - if the specified key cannot be compared
  937. with the keys currently in the map</dd>
  938. <dd><code><a href="../../java/lang/NullPointerException.html" title="class in java.lang">NullPointerException</a></code> - if the specified key is null
  939. and this map uses natural ordering, or its comparator
  940. does not permit null keys</dd>
  941. </dl>
  942. </li>
  943. </ul>
  944. <a name="remove-java.lang.Object-">
  945. <!-- -->
  946. </a>
  947. <ul class="blockList">
  948. <li class="blockList">
  949. <h4>remove</h4>
  950. <pre>public&nbsp;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&nbsp;remove(<a href="../../java/lang/Object.html" title="class in java.lang">Object</a>&nbsp;key)</pre>
  951. <div class="block">Removes the mapping for this key from this TreeMap if present.</div>
  952. <dl>
  953. <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
  954. <dd><code><a href="../../java/util/Map.html#remove-java.lang.Object-">remove</a></code>&nbsp;in interface&nbsp;<code><a href="../../java/util/Map.html" title="interface in java.util">Map</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></dd>
  955. <dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
  956. <dd><code><a href="../../java/util/AbstractMap.html#remove-java.lang.Object-">remove</a></code>&nbsp;in class&nbsp;<code><a href="../../java/util/AbstractMap.html" title="class in java.util">AbstractMap</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></dd>
  957. <dt><span class="paramLabel">Parameters:</span></dt>
  958. <dd><code>key</code> - key for which mapping should be removed</dd>
  959. <dt><span class="returnLabel">Returns:</span></dt>
  960. <dd>the previous value associated with <code>key</code>, or
  961. <code>null</code> if there was no mapping for <code>key</code>.
  962. (A <code>null</code> return can also indicate that the map
  963. previously associated <code>null</code> with <code>key</code>.)</dd>
  964. <dt><span class="throwsLabel">Throws:</span></dt>
  965. <dd><code><a href="../../java/lang/ClassCastException.html" title="class in java.lang">ClassCastException</a></code> - if the specified key cannot be compared
  966. with the keys currently in the map</dd>
  967. <dd><code><a href="../../java/lang/NullPointerException.html" title="class in java.lang">NullPointerException</a></code> - if the specified key is null
  968. and this map uses natural ordering, or its comparator
  969. does not permit null keys</dd>
  970. </dl>
  971. </li>
  972. </ul>
  973. <a name="clear--">
  974. <!-- -->
  975. </a>
  976. <ul class="blockList">
  977. <li class="blockList">
  978. <h4>clear</h4>
  979. <pre>public&nbsp;void&nbsp;clear()</pre>
  980. <div class="block">Removes all of the mappings from this map.
  981. The map will be empty after this call returns.</div>
  982. <dl>
  983. <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
  984. <dd><code><a href="../../java/util/Map.html#clear--">clear</a></code>&nbsp;in interface&nbsp;<code><a href="../../java/util/Map.html" title="interface in java.util">Map</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></dd>
  985. <dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
  986. <dd><code><a href="../../java/util/AbstractMap.html#clear--">clear</a></code>&nbsp;in class&nbsp;<code><a href="../../java/util/AbstractMap.html" title="class in java.util">AbstractMap</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></dd>
  987. </dl>
  988. </li>
  989. </ul>
  990. <a name="clone--">
  991. <!-- -->
  992. </a>
  993. <ul class="blockList">
  994. <li class="blockList">
  995. <h4>clone</h4>
  996. <pre>public&nbsp;<a href="../../java/lang/Object.html" title="class in java.lang">Object</a>&nbsp;clone()</pre>
  997. <div class="block">Returns a shallow copy of this <code>TreeMap</code> instance. (The keys and
  998. values themselves are not cloned.)</div>
  999. <dl>
  1000. <dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
  1001. <dd><code><a href="../../java/util/AbstractMap.html#clone--">clone</a></code>&nbsp;in class&nbsp;<code><a href="../../java/util/AbstractMap.html" title="class in java.util">AbstractMap</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></dd>
  1002. <dt><span class="returnLabel">Returns:</span></dt>
  1003. <dd>a shallow copy of this map</dd>
  1004. <dt><span class="seeLabel">See Also:</span></dt>
  1005. <dd><a href="../../java/lang/Cloneable.html" title="interface in java.lang"><code>Cloneable</code></a></dd>
  1006. </dl>
  1007. </li>
  1008. </ul>
  1009. <a name="firstEntry--">
  1010. <!-- -->
  1011. </a>
  1012. <ul class="blockList">
  1013. <li class="blockList">
  1014. <h4>firstEntry</h4>
  1015. <pre>public&nbsp;<a href="../../java/util/Map.Entry.html" title="interface in java.util">Map.Entry</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;&nbsp;firstEntry()</pre>
  1016. <div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../java/util/NavigableMap.html#firstEntry--">NavigableMap</a></code></span></div>
  1017. <div class="block">Returns a key-value mapping associated with the least
  1018. key in this map, or <code>null</code> if the map is empty.</div>
  1019. <dl>
  1020. <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
  1021. <dd><code><a href="../../java/util/NavigableMap.html#firstEntry--">firstEntry</a></code>&nbsp;in interface&nbsp;<code><a href="../../java/util/NavigableMap.html" title="interface in java.util">NavigableMap</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></dd>
  1022. <dt><span class="returnLabel">Returns:</span></dt>
  1023. <dd>an entry with the least key,
  1024. or <code>null</code> if this map is empty</dd>
  1025. <dt><span class="simpleTagLabel">Since:</span></dt>
  1026. <dd>1.6</dd>
  1027. </dl>
  1028. </li>
  1029. </ul>
  1030. <a name="lastEntry--">
  1031. <!-- -->
  1032. </a>
  1033. <ul class="blockList">
  1034. <li class="blockList">
  1035. <h4>lastEntry</h4>
  1036. <pre>public&nbsp;<a href="../../java/util/Map.Entry.html" title="interface in java.util">Map.Entry</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;&nbsp;lastEntry()</pre>
  1037. <div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../java/util/NavigableMap.html#lastEntry--">NavigableMap</a></code></span></div>
  1038. <div class="block">Returns a key-value mapping associated with the greatest
  1039. key in this map, or <code>null</code> if the map is empty.</div>
  1040. <dl>
  1041. <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
  1042. <dd><code><a href="../../java/util/NavigableMap.html#lastEntry--">lastEntry</a></code>&nbsp;in interface&nbsp;<code><a href="../../java/util/NavigableMap.html" title="interface in java.util">NavigableMap</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></dd>
  1043. <dt><span class="returnLabel">Returns:</span></dt>
  1044. <dd>an entry with the greatest key,
  1045. or <code>null</code> if this map is empty</dd>
  1046. <dt><span class="simpleTagLabel">Since:</span></dt>
  1047. <dd>1.6</dd>
  1048. </dl>
  1049. </li>
  1050. </ul>
  1051. <a name="pollFirstEntry--">
  1052. <!-- -->
  1053. </a>
  1054. <ul class="blockList">
  1055. <li class="blockList">
  1056. <h4>pollFirstEntry</h4>
  1057. <pre>public&nbsp;<a href="../../java/util/Map.Entry.html" title="interface in java.util">Map.Entry</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;&nbsp;pollFirstEntry()</pre>
  1058. <div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../java/util/NavigableMap.html#pollFirstEntry--">NavigableMap</a></code></span></div>
  1059. <div class="block">Removes and returns a key-value mapping associated with
  1060. the least key in this map, or <code>null</code> if the map is empty.</div>
  1061. <dl>
  1062. <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
  1063. <dd><code><a href="../../java/util/NavigableMap.html#pollFirstEntry--">pollFirstEntry</a></code>&nbsp;in interface&nbsp;<code><a href="../../java/util/NavigableMap.html" title="interface in java.util">NavigableMap</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></dd>
  1064. <dt><span class="returnLabel">Returns:</span></dt>
  1065. <dd>the removed first entry of this map,
  1066. or <code>null</code> if this map is empty</dd>
  1067. <dt><span class="simpleTagLabel">Since:</span></dt>
  1068. <dd>1.6</dd>
  1069. </dl>
  1070. </li>
  1071. </ul>
  1072. <a name="pollLastEntry--">
  1073. <!-- -->
  1074. </a>
  1075. <ul class="blockList">
  1076. <li class="blockList">
  1077. <h4>pollLastEntry</h4>
  1078. <pre>public&nbsp;<a href="../../java/util/Map.Entry.html" title="interface in java.util">Map.Entry</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;&nbsp;pollLastEntry()</pre>
  1079. <div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../java/util/NavigableMap.html#pollLastEntry--">NavigableMap</a></code></span></div>
  1080. <div class="block">Removes and returns a key-value mapping associated with
  1081. the greatest key in this map, or <code>null</code> if the map is empty.</div>
  1082. <dl>
  1083. <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
  1084. <dd><code><a href="../../java/util/NavigableMap.html#pollLastEntry--">pollLastEntry</a></code>&nbsp;in interface&nbsp;<code><a href="../../java/util/NavigableMap.html" title="interface in java.util">NavigableMap</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></dd>
  1085. <dt><span class="returnLabel">Returns:</span></dt>
  1086. <dd>the removed last entry of this map,
  1087. or <code>null</code> if this map is empty</dd>
  1088. <dt><span class="simpleTagLabel">Since:</span></dt>
  1089. <dd>1.6</dd>
  1090. </dl>
  1091. </li>
  1092. </ul>
  1093. <a name="lowerEntry-java.lang.Object-">
  1094. <!-- -->
  1095. </a><a name="lowerEntry-K-">
  1096. <!-- -->
  1097. </a>
  1098. <ul class="blockList">
  1099. <li class="blockList">
  1100. <h4>lowerEntry</h4>
  1101. <pre>public&nbsp;<a href="../../java/util/Map.Entry.html" title="interface in java.util">Map.Entry</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;&nbsp;lowerEntry(<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>&nbsp;key)</pre>
  1102. <div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../java/util/NavigableMap.html#lowerEntry-K-">NavigableMap</a></code></span></div>
  1103. <div class="block">Returns a key-value mapping associated with the greatest key
  1104. strictly less than the given key, or <code>null</code> if there is
  1105. no such key.</div>
  1106. <dl>
  1107. <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
  1108. <dd><code><a href="../../java/util/NavigableMap.html#lowerEntry-K-">lowerEntry</a></code>&nbsp;in interface&nbsp;<code><a href="../../java/util/NavigableMap.html" title="interface in java.util">NavigableMap</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></dd>
  1109. <dt><span class="paramLabel">Parameters:</span></dt>
  1110. <dd><code>key</code> - the key</dd>
  1111. <dt><span class="returnLabel">Returns:</span></dt>
  1112. <dd>an entry with the greatest key less than <code>key</code>,
  1113. or <code>null</code> if there is no such key</dd>
  1114. <dt><span class="throwsLabel">Throws:</span></dt>
  1115. <dd><code><a href="../../java/lang/ClassCastException.html" title="class in java.lang">ClassCastException</a></code> - if the specified key cannot be compared
  1116. with the keys currently in the map</dd>
  1117. <dd><code><a href="../../java/lang/NullPointerException.html" title="class in java.lang">NullPointerException</a></code> - if the specified key is null
  1118. and this map uses natural ordering, or its comparator
  1119. does not permit null keys</dd>
  1120. <dt><span class="simpleTagLabel">Since:</span></dt>
  1121. <dd>1.6</dd>
  1122. </dl>
  1123. </li>
  1124. </ul>
  1125. <a name="lowerKey-java.lang.Object-">
  1126. <!-- -->
  1127. </a><a name="lowerKey-K-">
  1128. <!-- -->
  1129. </a>
  1130. <ul class="blockList">
  1131. <li class="blockList">
  1132. <h4>lowerKey</h4>
  1133. <pre>public&nbsp;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>&nbsp;lowerKey(<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>&nbsp;key)</pre>
  1134. <div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../java/util/NavigableMap.html#lowerKey-K-">NavigableMap</a></code></span></div>
  1135. <div class="block">Returns the greatest key strictly less than the given key, or
  1136. <code>null</code> if there is no such key.</div>
  1137. <dl>
  1138. <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
  1139. <dd><code><a href="../../java/util/NavigableMap.html#lowerKey-K-">lowerKey</a></code>&nbsp;in interface&nbsp;<code><a href="../../java/util/NavigableMap.html" title="interface in java.util">NavigableMap</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></dd>
  1140. <dt><span class="paramLabel">Parameters:</span></dt>
  1141. <dd><code>key</code> - the key</dd>
  1142. <dt><span class="returnLabel">Returns:</span></dt>
  1143. <dd>the greatest key less than <code>key</code>,
  1144. or <code>null</code> if there is no such key</dd>
  1145. <dt><span class="throwsLabel">Throws:</span></dt>
  1146. <dd><code><a href="../../java/lang/ClassCastException.html" title="class in java.lang">ClassCastException</a></code> - if the specified key cannot be compared
  1147. with the keys currently in the map</dd>
  1148. <dd><code><a href="../../java/lang/NullPointerException.html" title="class in java.lang">NullPointerException</a></code> - if the specified key is null
  1149. and this map uses natural ordering, or its comparator
  1150. does not permit null keys</dd>
  1151. <dt><span class="simpleTagLabel">Since:</span></dt>
  1152. <dd>1.6</dd>
  1153. </dl>
  1154. </li>
  1155. </ul>
  1156. <a name="floorEntry-java.lang.Object-">
  1157. <!-- -->
  1158. </a><a name="floorEntry-K-">
  1159. <!-- -->
  1160. </a>
  1161. <ul class="blockList">
  1162. <li class="blockList">
  1163. <h4>floorEntry</h4>
  1164. <pre>public&nbsp;<a href="../../java/util/Map.Entry.html" title="interface in java.util">Map.Entry</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;&nbsp;floorEntry(<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>&nbsp;key)</pre>
  1165. <div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../java/util/NavigableMap.html#floorEntry-K-">NavigableMap</a></code></span></div>
  1166. <div class="block">Returns a key-value mapping associated with the greatest key
  1167. less than or equal to the given key, or <code>null</code> if there
  1168. is no such key.</div>
  1169. <dl>
  1170. <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
  1171. <dd><code><a href="../../java/util/NavigableMap.html#floorEntry-K-">floorEntry</a></code>&nbsp;in interface&nbsp;<code><a href="../../java/util/NavigableMap.html" title="interface in java.util">NavigableMap</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></dd>
  1172. <dt><span class="paramLabel">Parameters:</span></dt>
  1173. <dd><code>key</code> - the key</dd>
  1174. <dt><span class="returnLabel">Returns:</span></dt>
  1175. <dd>an entry with the greatest key less than or equal to
  1176. <code>key</code>, or <code>null</code> if there is no such key</dd>
  1177. <dt><span class="throwsLabel">Throws:</span></dt>
  1178. <dd><code><a href="../../java/lang/ClassCastException.html" title="class in java.lang">ClassCastException</a></code> - if the specified key cannot be compared
  1179. with the keys currently in the map</dd>
  1180. <dd><code><a href="../../java/lang/NullPointerException.html" title="class in java.lang">NullPointerException</a></code> - if the specified key is null
  1181. and this map uses natural ordering, or its comparator
  1182. does not permit null keys</dd>
  1183. <dt><span class="simpleTagLabel">Since:</span></dt>
  1184. <dd>1.6</dd>
  1185. </dl>
  1186. </li>
  1187. </ul>
  1188. <a name="floorKey-java.lang.Object-">
  1189. <!-- -->
  1190. </a><a name="floorKey-K-">
  1191. <!-- -->
  1192. </a>
  1193. <ul class="blockList">
  1194. <li class="blockList">
  1195. <h4>floorKey</h4>
  1196. <pre>public&nbsp;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>&nbsp;floorKey(<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>&nbsp;key)</pre>
  1197. <div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../java/util/NavigableMap.html#floorKey-K-">NavigableMap</a></code></span></div>
  1198. <div class="block">Returns the greatest key less than or equal to the given key,
  1199. or <code>null</code> if there is no such key.</div>
  1200. <dl>
  1201. <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
  1202. <dd><code><a href="../../java/util/NavigableMap.html#floorKey-K-">floorKey</a></code>&nbsp;in interface&nbsp;<code><a href="../../java/util/NavigableMap.html" title="interface in java.util">NavigableMap</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></dd>
  1203. <dt><span class="paramLabel">Parameters:</span></dt>
  1204. <dd><code>key</code> - the key</dd>
  1205. <dt><span class="returnLabel">Returns:</span></dt>
  1206. <dd>the greatest key less than or equal to <code>key</code>,
  1207. or <code>null</code> if there is no such key</dd>
  1208. <dt><span class="throwsLabel">Throws:</span></dt>
  1209. <dd><code><a href="../../java/lang/ClassCastException.html" title="class in java.lang">ClassCastException</a></code> - if the specified key cannot be compared
  1210. with the keys currently in the map</dd>
  1211. <dd><code><a href="../../java/lang/NullPointerException.html" title="class in java.lang">NullPointerException</a></code> - if the specified key is null
  1212. and this map uses natural ordering, or its comparator
  1213. does not permit null keys</dd>
  1214. <dt><span class="simpleTagLabel">Since:</span></dt>
  1215. <dd>1.6</dd>
  1216. </dl>
  1217. </li>
  1218. </ul>
  1219. <a name="ceilingEntry-java.lang.Object-">
  1220. <!-- -->
  1221. </a><a name="ceilingEntry-K-">
  1222. <!-- -->
  1223. </a>
  1224. <ul class="blockList">
  1225. <li class="blockList">
  1226. <h4>ceilingEntry</h4>
  1227. <pre>public&nbsp;<a href="../../java/util/Map.Entry.html" title="interface in java.util">Map.Entry</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;&nbsp;ceilingEntry(<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>&nbsp;key)</pre>
  1228. <div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../java/util/NavigableMap.html#ceilingEntry-K-">NavigableMap</a></code></span></div>
  1229. <div class="block">Returns a key-value mapping associated with the least key
  1230. greater than or equal to the given key, or <code>null</code> if
  1231. there is no such key.</div>
  1232. <dl>
  1233. <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
  1234. <dd><code><a href="../../java/util/NavigableMap.html#ceilingEntry-K-">ceilingEntry</a></code>&nbsp;in interface&nbsp;<code><a href="../../java/util/NavigableMap.html" title="interface in java.util">NavigableMap</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></dd>
  1235. <dt><span class="paramLabel">Parameters:</span></dt>
  1236. <dd><code>key</code> - the key</dd>
  1237. <dt><span class="returnLabel">Returns:</span></dt>
  1238. <dd>an entry with the least key greater than or equal to
  1239. <code>key</code>, or <code>null</code> if there is no such key</dd>
  1240. <dt><span class="throwsLabel">Throws:</span></dt>
  1241. <dd><code><a href="../../java/lang/ClassCastException.html" title="class in java.lang">ClassCastException</a></code> - if the specified key cannot be compared
  1242. with the keys currently in the map</dd>
  1243. <dd><code><a href="../../java/lang/NullPointerException.html" title="class in java.lang">NullPointerException</a></code> - if the specified key is null
  1244. and this map uses natural ordering, or its comparator
  1245. does not permit null keys</dd>
  1246. <dt><span class="simpleTagLabel">Since:</span></dt>
  1247. <dd>1.6</dd>
  1248. </dl>
  1249. </li>
  1250. </ul>
  1251. <a name="ceilingKey-java.lang.Object-">
  1252. <!-- -->
  1253. </a><a name="ceilingKey-K-">
  1254. <!-- -->
  1255. </a>
  1256. <ul class="blockList">
  1257. <li class="blockList">
  1258. <h4>ceilingKey</h4>
  1259. <pre>public&nbsp;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>&nbsp;ceilingKey(<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>&nbsp;key)</pre>
  1260. <div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../java/util/NavigableMap.html#ceilingKey-K-">NavigableMap</a></code></span></div>
  1261. <div class="block">Returns the least key greater than or equal to the given key,
  1262. or <code>null</code> if there is no such key.</div>
  1263. <dl>
  1264. <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
  1265. <dd><code><a href="../../java/util/NavigableMap.html#ceilingKey-K-">ceilingKey</a></code>&nbsp;in interface&nbsp;<code><a href="../../java/util/NavigableMap.html" title="interface in java.util">NavigableMap</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></dd>
  1266. <dt><span class="paramLabel">Parameters:</span></dt>
  1267. <dd><code>key</code> - the key</dd>
  1268. <dt><span class="returnLabel">Returns:</span></dt>
  1269. <dd>the least key greater than or equal to <code>key</code>,
  1270. or <code>null</code> if there is no such key</dd>
  1271. <dt><span class="throwsLabel">Throws:</span></dt>
  1272. <dd><code><a href="../../java/lang/ClassCastException.html" title="class in java.lang">ClassCastException</a></code> - if the specified key cannot be compared
  1273. with the keys currently in the map</dd>
  1274. <dd><code><a href="../../java/lang/NullPointerException.html" title="class in java.lang">NullPointerException</a></code> - if the specified key is null
  1275. and this map uses natural ordering, or its comparator
  1276. does not permit null keys</dd>
  1277. <dt><span class="simpleTagLabel">Since:</span></dt>
  1278. <dd>1.6</dd>
  1279. </dl>
  1280. </li>
  1281. </ul>
  1282. <a name="higherEntry-java.lang.Object-">
  1283. <!-- -->
  1284. </a><a name="higherEntry-K-">
  1285. <!-- -->
  1286. </a>
  1287. <ul class="blockList">
  1288. <li class="blockList">
  1289. <h4>higherEntry</h4>
  1290. <pre>public&nbsp;<a href="../../java/util/Map.Entry.html" title="interface in java.util">Map.Entry</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;&nbsp;higherEntry(<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>&nbsp;key)</pre>
  1291. <div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../java/util/NavigableMap.html#higherEntry-K-">NavigableMap</a></code></span></div>
  1292. <div class="block">Returns a key-value mapping associated with the least key
  1293. strictly greater than the given key, or <code>null</code> if there
  1294. is no such key.</div>
  1295. <dl>
  1296. <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
  1297. <dd><code><a href="../../java/util/NavigableMap.html#higherEntry-K-">higherEntry</a></code>&nbsp;in interface&nbsp;<code><a href="../../java/util/NavigableMap.html" title="interface in java.util">NavigableMap</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></dd>
  1298. <dt><span class="paramLabel">Parameters:</span></dt>
  1299. <dd><code>key</code> - the key</dd>
  1300. <dt><span class="returnLabel">Returns:</span></dt>
  1301. <dd>an entry with the least key greater than <code>key</code>,
  1302. or <code>null</code> if there is no such key</dd>
  1303. <dt><span class="throwsLabel">Throws:</span></dt>
  1304. <dd><code><a href="../../java/lang/ClassCastException.html" title="class in java.lang">ClassCastException</a></code> - if the specified key cannot be compared
  1305. with the keys currently in the map</dd>
  1306. <dd><code><a href="../../java/lang/NullPointerException.html" title="class in java.lang">NullPointerException</a></code> - if the specified key is null
  1307. and this map uses natural ordering, or its comparator
  1308. does not permit null keys</dd>
  1309. <dt><span class="simpleTagLabel">Since:</span></dt>
  1310. <dd>1.6</dd>
  1311. </dl>
  1312. </li>
  1313. </ul>
  1314. <a name="higherKey-java.lang.Object-">
  1315. <!-- -->
  1316. </a><a name="higherKey-K-">
  1317. <!-- -->
  1318. </a>
  1319. <ul class="blockList">
  1320. <li class="blockList">
  1321. <h4>higherKey</h4>
  1322. <pre>public&nbsp;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>&nbsp;higherKey(<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>&nbsp;key)</pre>
  1323. <div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../java/util/NavigableMap.html#higherKey-K-">NavigableMap</a></code></span></div>
  1324. <div class="block">Returns the least key strictly greater than the given key, or
  1325. <code>null</code> if there is no such key.</div>
  1326. <dl>
  1327. <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
  1328. <dd><code><a href="../../java/util/NavigableMap.html#higherKey-K-">higherKey</a></code>&nbsp;in interface&nbsp;<code><a href="../../java/util/NavigableMap.html" title="interface in java.util">NavigableMap</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></dd>
  1329. <dt><span class="paramLabel">Parameters:</span></dt>
  1330. <dd><code>key</code> - the key</dd>
  1331. <dt><span class="returnLabel">Returns:</span></dt>
  1332. <dd>the least key greater than <code>key</code>,
  1333. or <code>null</code> if there is no such key</dd>
  1334. <dt><span class="throwsLabel">Throws:</span></dt>
  1335. <dd><code><a href="../../java/lang/ClassCastException.html" title="class in java.lang">ClassCastException</a></code> - if the specified key cannot be compared
  1336. with the keys currently in the map</dd>
  1337. <dd><code><a href="../../java/lang/NullPointerException.html" title="class in java.lang">NullPointerException</a></code> - if the specified key is null
  1338. and this map uses natural ordering, or its comparator
  1339. does not permit null keys</dd>
  1340. <dt><span class="simpleTagLabel">Since:</span></dt>
  1341. <dd>1.6</dd>
  1342. </dl>
  1343. </li>
  1344. </ul>
  1345. <a name="keySet--">
  1346. <!-- -->
  1347. </a>
  1348. <ul class="blockList">
  1349. <li class="blockList">
  1350. <h4>keySet</h4>
  1351. <pre>public&nbsp;<a href="../../java/util/Set.html" title="interface in java.util">Set</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>&gt;&nbsp;keySet()</pre>
  1352. <div class="block">Returns a <a href="../../java/util/Set.html" title="interface in java.util"><code>Set</code></a> view of the keys contained in this map.
  1353. <p>The set's iterator returns the keys in ascending order.
  1354. The set's spliterator is
  1355. <em><a href="Spliterator.html#binding">late-binding</a></em>,
  1356. <em>fail-fast</em>, and additionally reports <a href="../../java/util/Spliterator.html#SORTED"><code>Spliterator.SORTED</code></a>
  1357. and <a href="../../java/util/Spliterator.html#ORDERED"><code>Spliterator.ORDERED</code></a> with an encounter order that is ascending
  1358. key order. The spliterator's comparator (see
  1359. <a href="../../java/util/Spliterator.html#getComparator--"><code>Spliterator.getComparator()</code></a>) is <code>null</code> if
  1360. the tree map's comparator (see <a href="../../java/util/TreeMap.html#comparator--"><code>comparator()</code></a>) is <code>null</code>.
  1361. Otherwise, the spliterator's comparator is the same as or imposes the
  1362. same total ordering as the tree map's comparator.
  1363. <p>The set is backed by the map, so changes to the map are
  1364. reflected in the set, and vice-versa. If the map is modified
  1365. while an iteration over the set is in progress (except through
  1366. the iterator's own <code>remove</code> operation), the results of
  1367. the iteration are undefined. The set supports element removal,
  1368. which removes the corresponding mapping from the map, via the
  1369. <code>Iterator.remove</code>, <code>Set.remove</code>,
  1370. <code>removeAll</code>, <code>retainAll</code>, and <code>clear</code>
  1371. operations. It does not support the <code>add</code> or <code>addAll</code>
  1372. operations.</div>
  1373. <dl>
  1374. <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
  1375. <dd><code><a href="../../java/util/Map.html#keySet--">keySet</a></code>&nbsp;in interface&nbsp;<code><a href="../../java/util/Map.html" title="interface in java.util">Map</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></dd>
  1376. <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
  1377. <dd><code><a href="../../java/util/SortedMap.html#keySet--">keySet</a></code>&nbsp;in interface&nbsp;<code><a href="../../java/util/SortedMap.html" title="interface in java.util">SortedMap</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></dd>
  1378. <dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
  1379. <dd><code><a href="../../java/util/AbstractMap.html#keySet--">keySet</a></code>&nbsp;in class&nbsp;<code><a href="../../java/util/AbstractMap.html" title="class in java.util">AbstractMap</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></dd>
  1380. <dt><span class="returnLabel">Returns:</span></dt>
  1381. <dd>a set view of the keys contained in this map</dd>
  1382. </dl>
  1383. </li>
  1384. </ul>
  1385. <a name="navigableKeySet--">
  1386. <!-- -->
  1387. </a>
  1388. <ul class="blockList">
  1389. <li class="blockList">
  1390. <h4>navigableKeySet</h4>
  1391. <pre>public&nbsp;<a href="../../java/util/NavigableSet.html" title="interface in java.util">NavigableSet</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>&gt;&nbsp;navigableKeySet()</pre>
  1392. <div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../java/util/NavigableMap.html#navigableKeySet--">NavigableMap</a></code></span></div>
  1393. <div class="block">Returns a <a href="../../java/util/NavigableSet.html" title="interface in java.util"><code>NavigableSet</code></a> view of the keys contained in this map.
  1394. The set's iterator returns the keys in ascending order.
  1395. The set is backed by the map, so changes to the map are reflected in
  1396. the set, and vice-versa. If the map is modified while an iteration
  1397. over the set is in progress (except through the iterator's own <code>remove</code> operation), the results of the iteration are undefined. The
  1398. set supports element removal, which removes the corresponding mapping
  1399. from the map, via the <code>Iterator.remove</code>, <code>Set.remove</code>,
  1400. <code>removeAll</code>, <code>retainAll</code>, and <code>clear</code> operations.
  1401. It does not support the <code>add</code> or <code>addAll</code> operations.</div>
  1402. <dl>
  1403. <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
  1404. <dd><code><a href="../../java/util/NavigableMap.html#navigableKeySet--">navigableKeySet</a></code>&nbsp;in interface&nbsp;<code><a href="../../java/util/NavigableMap.html" title="interface in java.util">NavigableMap</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></dd>
  1405. <dt><span class="returnLabel">Returns:</span></dt>
  1406. <dd>a navigable set view of the keys in this map</dd>
  1407. <dt><span class="simpleTagLabel">Since:</span></dt>
  1408. <dd>1.6</dd>
  1409. </dl>
  1410. </li>
  1411. </ul>
  1412. <a name="descendingKeySet--">
  1413. <!-- -->
  1414. </a>
  1415. <ul class="blockList">
  1416. <li class="blockList">
  1417. <h4>descendingKeySet</h4>
  1418. <pre>public&nbsp;<a href="../../java/util/NavigableSet.html" title="interface in java.util">NavigableSet</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>&gt;&nbsp;descendingKeySet()</pre>
  1419. <div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../java/util/NavigableMap.html#descendingKeySet--">NavigableMap</a></code></span></div>
  1420. <div class="block">Returns a reverse order <a href="../../java/util/NavigableSet.html" title="interface in java.util"><code>NavigableSet</code></a> view of the keys contained in this map.
  1421. The set's iterator returns the keys in descending order.
  1422. The set is backed by the map, so changes to the map are reflected in
  1423. the set, and vice-versa. If the map is modified while an iteration
  1424. over the set is in progress (except through the iterator's own <code>remove</code> operation), the results of the iteration are undefined. The
  1425. set supports element removal, which removes the corresponding mapping
  1426. from the map, via the <code>Iterator.remove</code>, <code>Set.remove</code>,
  1427. <code>removeAll</code>, <code>retainAll</code>, and <code>clear</code> operations.
  1428. It does not support the <code>add</code> or <code>addAll</code> operations.</div>
  1429. <dl>
  1430. <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
  1431. <dd><code><a href="../../java/util/NavigableMap.html#descendingKeySet--">descendingKeySet</a></code>&nbsp;in interface&nbsp;<code><a href="../../java/util/NavigableMap.html" title="interface in java.util">NavigableMap</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></dd>
  1432. <dt><span class="returnLabel">Returns:</span></dt>
  1433. <dd>a reverse order navigable set view of the keys in this map</dd>
  1434. <dt><span class="simpleTagLabel">Since:</span></dt>
  1435. <dd>1.6</dd>
  1436. </dl>
  1437. </li>
  1438. </ul>
  1439. <a name="values--">
  1440. <!-- -->
  1441. </a>
  1442. <ul class="blockList">
  1443. <li class="blockList">
  1444. <h4>values</h4>
  1445. <pre>public&nbsp;<a href="../../java/util/Collection.html" title="interface in java.util">Collection</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;&nbsp;values()</pre>
  1446. <div class="block">Returns a <a href="../../java/util/Collection.html" title="interface in java.util"><code>Collection</code></a> view of the values contained in this map.
  1447. <p>The collection's iterator returns the values in ascending order
  1448. of the corresponding keys. The collection's spliterator is
  1449. <em><a href="Spliterator.html#binding">late-binding</a></em>,
  1450. <em>fail-fast</em>, and additionally reports <a href="../../java/util/Spliterator.html#ORDERED"><code>Spliterator.ORDERED</code></a>
  1451. with an encounter order that is ascending order of the corresponding
  1452. keys.
  1453. <p>The collection is backed by the map, so changes to the map are
  1454. reflected in the collection, and vice-versa. If the map is
  1455. modified while an iteration over the collection is in progress
  1456. (except through the iterator's own <code>remove</code> operation),
  1457. the results of the iteration are undefined. The collection
  1458. supports element removal, which removes the corresponding
  1459. mapping from the map, via the <code>Iterator.remove</code>,
  1460. <code>Collection.remove</code>, <code>removeAll</code>,
  1461. <code>retainAll</code> and <code>clear</code> operations. It does not
  1462. support the <code>add</code> or <code>addAll</code> operations.</div>
  1463. <dl>
  1464. <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
  1465. <dd><code><a href="../../java/util/Map.html#values--">values</a></code>&nbsp;in interface&nbsp;<code><a href="../../java/util/Map.html" title="interface in java.util">Map</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></dd>
  1466. <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
  1467. <dd><code><a href="../../java/util/SortedMap.html#values--">values</a></code>&nbsp;in interface&nbsp;<code><a href="../../java/util/SortedMap.html" title="interface in java.util">SortedMap</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></dd>
  1468. <dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
  1469. <dd><code><a href="../../java/util/AbstractMap.html#values--">values</a></code>&nbsp;in class&nbsp;<code><a href="../../java/util/AbstractMap.html" title="class in java.util">AbstractMap</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></dd>
  1470. <dt><span class="returnLabel">Returns:</span></dt>
  1471. <dd>a collection view of the values contained in this map</dd>
  1472. </dl>
  1473. </li>
  1474. </ul>
  1475. <a name="entrySet--">
  1476. <!-- -->
  1477. </a>
  1478. <ul class="blockList">
  1479. <li class="blockList">
  1480. <h4>entrySet</h4>
  1481. <pre>public&nbsp;<a href="../../java/util/Set.html" title="interface in java.util">Set</a>&lt;<a href="../../java/util/Map.Entry.html" title="interface in java.util">Map.Entry</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;&gt;&nbsp;entrySet()</pre>
  1482. <div class="block">Returns a <a href="../../java/util/Set.html" title="interface in java.util"><code>Set</code></a> view of the mappings contained in this map.
  1483. <p>The set's iterator returns the entries in ascending key order. The
  1484. sets's spliterator is
  1485. <em><a href="Spliterator.html#binding">late-binding</a></em>,
  1486. <em>fail-fast</em>, and additionally reports <a href="../../java/util/Spliterator.html#SORTED"><code>Spliterator.SORTED</code></a> and
  1487. <a href="../../java/util/Spliterator.html#ORDERED"><code>Spliterator.ORDERED</code></a> with an encounter order that is ascending key
  1488. order.
  1489. <p>The set is backed by the map, so changes to the map are
  1490. reflected in the set, and vice-versa. If the map is modified
  1491. while an iteration over the set is in progress (except through
  1492. the iterator's own <code>remove</code> operation, or through the
  1493. <code>setValue</code> operation on a map entry returned by the
  1494. iterator) the results of the iteration are undefined. The set
  1495. supports element removal, which removes the corresponding
  1496. mapping from the map, via the <code>Iterator.remove</code>,
  1497. <code>Set.remove</code>, <code>removeAll</code>, <code>retainAll</code> and
  1498. <code>clear</code> operations. It does not support the
  1499. <code>add</code> or <code>addAll</code> operations.</div>
  1500. <dl>
  1501. <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
  1502. <dd><code><a href="../../java/util/Map.html#entrySet--">entrySet</a></code>&nbsp;in interface&nbsp;<code><a href="../../java/util/Map.html" title="interface in java.util">Map</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></dd>
  1503. <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
  1504. <dd><code><a href="../../java/util/SortedMap.html#entrySet--">entrySet</a></code>&nbsp;in interface&nbsp;<code><a href="../../java/util/SortedMap.html" title="interface in java.util">SortedMap</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></dd>
  1505. <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
  1506. <dd><code><a href="../../java/util/AbstractMap.html#entrySet--">entrySet</a></code>&nbsp;in class&nbsp;<code><a href="../../java/util/AbstractMap.html" title="class in java.util">AbstractMap</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></dd>
  1507. <dt><span class="returnLabel">Returns:</span></dt>
  1508. <dd>a set view of the mappings contained in this map</dd>
  1509. </dl>
  1510. </li>
  1511. </ul>
  1512. <a name="descendingMap--">
  1513. <!-- -->
  1514. </a>
  1515. <ul class="blockList">
  1516. <li class="blockList">
  1517. <h4>descendingMap</h4>
  1518. <pre>public&nbsp;<a href="../../java/util/NavigableMap.html" title="interface in java.util">NavigableMap</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;&nbsp;descendingMap()</pre>
  1519. <div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../java/util/NavigableMap.html#descendingMap--">NavigableMap</a></code></span></div>
  1520. <div class="block">Returns a reverse order view of the mappings contained in this map.
  1521. The descending map is backed by this map, so changes to the map are
  1522. reflected in the descending map, and vice-versa. If either map is
  1523. modified while an iteration over a collection view of either map
  1524. is in progress (except through the iterator's own <code>remove</code>
  1525. operation), the results of the iteration are undefined.
  1526. <p>The returned map has an ordering equivalent to
  1527. <tt><a href="../../java/util/Collections.html#reverseOrder-java.util.Comparator-"><code>Collections.reverseOrder</code></a>(comparator())</tt>.
  1528. The expression <code>m.descendingMap().descendingMap()</code> returns a
  1529. view of <code>m</code> essentially equivalent to <code>m</code>.</div>
  1530. <dl>
  1531. <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
  1532. <dd><code><a href="../../java/util/NavigableMap.html#descendingMap--">descendingMap</a></code>&nbsp;in interface&nbsp;<code><a href="../../java/util/NavigableMap.html" title="interface in java.util">NavigableMap</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></dd>
  1533. <dt><span class="returnLabel">Returns:</span></dt>
  1534. <dd>a reverse order view of this map</dd>
  1535. <dt><span class="simpleTagLabel">Since:</span></dt>
  1536. <dd>1.6</dd>
  1537. </dl>
  1538. </li>
  1539. </ul>
  1540. <a name="subMap-java.lang.Object-boolean-java.lang.Object-boolean-">
  1541. <!-- -->
  1542. </a><a name="subMap-K-boolean-K-boolean-">
  1543. <!-- -->
  1544. </a>
  1545. <ul class="blockList">
  1546. <li class="blockList">
  1547. <h4>subMap</h4>
  1548. <pre>public&nbsp;<a href="../../java/util/NavigableMap.html" title="interface in java.util">NavigableMap</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;&nbsp;subMap(<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>&nbsp;fromKey,
  1549. boolean&nbsp;fromInclusive,
  1550. <a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>&nbsp;toKey,
  1551. boolean&nbsp;toInclusive)</pre>
  1552. <div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../java/util/NavigableMap.html#subMap-K-boolean-K-boolean-">NavigableMap</a></code></span></div>
  1553. <div class="block">Returns a view of the portion of this map whose keys range from
  1554. <code>fromKey</code> to <code>toKey</code>. If <code>fromKey</code> and
  1555. <code>toKey</code> are equal, the returned map is empty unless
  1556. <code>fromInclusive</code> and <code>toInclusive</code> are both true. The
  1557. returned map is backed by this map, so changes in the returned map are
  1558. reflected in this map, and vice-versa. The returned map supports all
  1559. optional map operations that this map supports.
  1560. <p>The returned map will throw an <code>IllegalArgumentException</code>
  1561. on an attempt to insert a key outside of its range, or to construct a
  1562. submap either of whose endpoints lie outside its range.</div>
  1563. <dl>
  1564. <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
  1565. <dd><code><a href="../../java/util/NavigableMap.html#subMap-K-boolean-K-boolean-">subMap</a></code>&nbsp;in interface&nbsp;<code><a href="../../java/util/NavigableMap.html" title="interface in java.util">NavigableMap</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></dd>
  1566. <dt><span class="paramLabel">Parameters:</span></dt>
  1567. <dd><code>fromKey</code> - low endpoint of the keys in the returned map</dd>
  1568. <dd><code>fromInclusive</code> - <code>true</code> if the low endpoint
  1569. is to be included in the returned view</dd>
  1570. <dd><code>toKey</code> - high endpoint of the keys in the returned map</dd>
  1571. <dd><code>toInclusive</code> - <code>true</code> if the high endpoint
  1572. is to be included in the returned view</dd>
  1573. <dt><span class="returnLabel">Returns:</span></dt>
  1574. <dd>a view of the portion of this map whose keys range from
  1575. <code>fromKey</code> to <code>toKey</code></dd>
  1576. <dt><span class="throwsLabel">Throws:</span></dt>
  1577. <dd><code><a href="../../java/lang/ClassCastException.html" title="class in java.lang">ClassCastException</a></code> - if <code>fromKey</code> and <code>toKey</code>
  1578. cannot be compared to one another using this map's comparator
  1579. (or, if the map has no comparator, using natural ordering).
  1580. Implementations may, but are not required to, throw this
  1581. exception if <code>fromKey</code> or <code>toKey</code>
  1582. cannot be compared to keys currently in the map.</dd>
  1583. <dd><code><a href="../../java/lang/NullPointerException.html" title="class in java.lang">NullPointerException</a></code> - if <code>fromKey</code> or <code>toKey</code> is
  1584. null and this map uses natural ordering, or its comparator
  1585. does not permit null keys</dd>
  1586. <dd><code><a href="../../java/lang/IllegalArgumentException.html" title="class in java.lang">IllegalArgumentException</a></code> - if <code>fromKey</code> is greater than
  1587. <code>toKey</code>; or if this map itself has a restricted
  1588. range, and <code>fromKey</code> or <code>toKey</code> lies
  1589. outside the bounds of the range</dd>
  1590. <dt><span class="simpleTagLabel">Since:</span></dt>
  1591. <dd>1.6</dd>
  1592. </dl>
  1593. </li>
  1594. </ul>
  1595. <a name="headMap-java.lang.Object-boolean-">
  1596. <!-- -->
  1597. </a><a name="headMap-K-boolean-">
  1598. <!-- -->
  1599. </a>
  1600. <ul class="blockList">
  1601. <li class="blockList">
  1602. <h4>headMap</h4>
  1603. <pre>public&nbsp;<a href="../../java/util/NavigableMap.html" title="interface in java.util">NavigableMap</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;&nbsp;headMap(<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>&nbsp;toKey,
  1604. boolean&nbsp;inclusive)</pre>
  1605. <div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../java/util/NavigableMap.html#headMap-K-boolean-">NavigableMap</a></code></span></div>
  1606. <div class="block">Returns a view of the portion of this map whose keys are less than (or
  1607. equal to, if <code>inclusive</code> is true) <code>toKey</code>. The returned
  1608. map is backed by this map, so changes in the returned map are reflected
  1609. in this map, and vice-versa. The returned map supports all optional
  1610. map operations that this map supports.
  1611. <p>The returned map will throw an <code>IllegalArgumentException</code>
  1612. on an attempt to insert a key outside its range.</div>
  1613. <dl>
  1614. <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
  1615. <dd><code><a href="../../java/util/NavigableMap.html#headMap-K-boolean-">headMap</a></code>&nbsp;in interface&nbsp;<code><a href="../../java/util/NavigableMap.html" title="interface in java.util">NavigableMap</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></dd>
  1616. <dt><span class="paramLabel">Parameters:</span></dt>
  1617. <dd><code>toKey</code> - high endpoint of the keys in the returned map</dd>
  1618. <dd><code>inclusive</code> - <code>true</code> if the high endpoint
  1619. is to be included in the returned view</dd>
  1620. <dt><span class="returnLabel">Returns:</span></dt>
  1621. <dd>a view of the portion of this map whose keys are less than
  1622. (or equal to, if <code>inclusive</code> is true) <code>toKey</code></dd>
  1623. <dt><span class="throwsLabel">Throws:</span></dt>
  1624. <dd><code><a href="../../java/lang/ClassCastException.html" title="class in java.lang">ClassCastException</a></code> - if <code>toKey</code> is not compatible
  1625. with this map's comparator (or, if the map has no comparator,
  1626. if <code>toKey</code> does not implement <a href="../../java/lang/Comparable.html" title="interface in java.lang"><code>Comparable</code></a>).
  1627. Implementations may, but are not required to, throw this
  1628. exception if <code>toKey</code> cannot be compared to keys
  1629. currently in the map.</dd>
  1630. <dd><code><a href="../../java/lang/NullPointerException.html" title="class in java.lang">NullPointerException</a></code> - if <code>toKey</code> is null
  1631. and this map uses natural ordering, or its comparator
  1632. does not permit null keys</dd>
  1633. <dd><code><a href="../../java/lang/IllegalArgumentException.html" title="class in java.lang">IllegalArgumentException</a></code> - if this map itself has a
  1634. restricted range, and <code>toKey</code> lies outside the
  1635. bounds of the range</dd>
  1636. <dt><span class="simpleTagLabel">Since:</span></dt>
  1637. <dd>1.6</dd>
  1638. </dl>
  1639. </li>
  1640. </ul>
  1641. <a name="tailMap-java.lang.Object-boolean-">
  1642. <!-- -->
  1643. </a><a name="tailMap-K-boolean-">
  1644. <!-- -->
  1645. </a>
  1646. <ul class="blockList">
  1647. <li class="blockList">
  1648. <h4>tailMap</h4>
  1649. <pre>public&nbsp;<a href="../../java/util/NavigableMap.html" title="interface in java.util">NavigableMap</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;&nbsp;tailMap(<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>&nbsp;fromKey,
  1650. boolean&nbsp;inclusive)</pre>
  1651. <div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../java/util/NavigableMap.html#tailMap-K-boolean-">NavigableMap</a></code></span></div>
  1652. <div class="block">Returns a view of the portion of this map whose keys are greater than (or
  1653. equal to, if <code>inclusive</code> is true) <code>fromKey</code>. The returned
  1654. map is backed by this map, so changes in the returned map are reflected
  1655. in this map, and vice-versa. The returned map supports all optional
  1656. map operations that this map supports.
  1657. <p>The returned map will throw an <code>IllegalArgumentException</code>
  1658. on an attempt to insert a key outside its range.</div>
  1659. <dl>
  1660. <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
  1661. <dd><code><a href="../../java/util/NavigableMap.html#tailMap-K-boolean-">tailMap</a></code>&nbsp;in interface&nbsp;<code><a href="../../java/util/NavigableMap.html" title="interface in java.util">NavigableMap</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></dd>
  1662. <dt><span class="paramLabel">Parameters:</span></dt>
  1663. <dd><code>fromKey</code> - low endpoint of the keys in the returned map</dd>
  1664. <dd><code>inclusive</code> - <code>true</code> if the low endpoint
  1665. is to be included in the returned view</dd>
  1666. <dt><span class="returnLabel">Returns:</span></dt>
  1667. <dd>a view of the portion of this map whose keys are greater than
  1668. (or equal to, if <code>inclusive</code> is true) <code>fromKey</code></dd>
  1669. <dt><span class="throwsLabel">Throws:</span></dt>
  1670. <dd><code><a href="../../java/lang/ClassCastException.html" title="class in java.lang">ClassCastException</a></code> - if <code>fromKey</code> is not compatible
  1671. with this map's comparator (or, if the map has no comparator,
  1672. if <code>fromKey</code> does not implement <a href="../../java/lang/Comparable.html" title="interface in java.lang"><code>Comparable</code></a>).
  1673. Implementations may, but are not required to, throw this
  1674. exception if <code>fromKey</code> cannot be compared to keys
  1675. currently in the map.</dd>
  1676. <dd><code><a href="../../java/lang/NullPointerException.html" title="class in java.lang">NullPointerException</a></code> - if <code>fromKey</code> is null
  1677. and this map uses natural ordering, or its comparator
  1678. does not permit null keys</dd>
  1679. <dd><code><a href="../../java/lang/IllegalArgumentException.html" title="class in java.lang">IllegalArgumentException</a></code> - if this map itself has a
  1680. restricted range, and <code>fromKey</code> lies outside the
  1681. bounds of the range</dd>
  1682. <dt><span class="simpleTagLabel">Since:</span></dt>
  1683. <dd>1.6</dd>
  1684. </dl>
  1685. </li>
  1686. </ul>
  1687. <a name="subMap-java.lang.Object-java.lang.Object-">
  1688. <!-- -->
  1689. </a><a name="subMap-K-K-">
  1690. <!-- -->
  1691. </a>
  1692. <ul class="blockList">
  1693. <li class="blockList">
  1694. <h4>subMap</h4>
  1695. <pre>public&nbsp;<a href="../../java/util/SortedMap.html" title="interface in java.util">SortedMap</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;&nbsp;subMap(<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>&nbsp;fromKey,
  1696. <a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>&nbsp;toKey)</pre>
  1697. <div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../java/util/NavigableMap.html#subMap-K-K-">NavigableMap</a></code></span></div>
  1698. <div class="block">Returns a view of the portion of this map whose keys range from
  1699. <code>fromKey</code>, inclusive, to <code>toKey</code>, exclusive. (If
  1700. <code>fromKey</code> and <code>toKey</code> are equal, the returned map
  1701. is empty.) The returned map is backed by this map, so changes
  1702. in the returned map are reflected in this map, and vice-versa.
  1703. The returned map supports all optional map operations that this
  1704. map supports.
  1705. <p>The returned map will throw an <code>IllegalArgumentException</code>
  1706. on an attempt to insert a key outside its range.
  1707. <p>Equivalent to <code>subMap(fromKey, true, toKey, false)</code>.</div>
  1708. <dl>
  1709. <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
  1710. <dd><code><a href="../../java/util/NavigableMap.html#subMap-K-K-">subMap</a></code>&nbsp;in interface&nbsp;<code><a href="../../java/util/NavigableMap.html" title="interface in java.util">NavigableMap</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></dd>
  1711. <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
  1712. <dd><code><a href="../../java/util/SortedMap.html#subMap-K-K-">subMap</a></code>&nbsp;in interface&nbsp;<code><a href="../../java/util/SortedMap.html" title="interface in java.util">SortedMap</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></dd>
  1713. <dt><span class="paramLabel">Parameters:</span></dt>
  1714. <dd><code>fromKey</code> - low endpoint (inclusive) of the keys in the returned map</dd>
  1715. <dd><code>toKey</code> - high endpoint (exclusive) of the keys in the returned map</dd>
  1716. <dt><span class="returnLabel">Returns:</span></dt>
  1717. <dd>a view of the portion of this map whose keys range from
  1718. <code>fromKey</code>, inclusive, to <code>toKey</code>, exclusive</dd>
  1719. <dt><span class="throwsLabel">Throws:</span></dt>
  1720. <dd><code><a href="../../java/lang/ClassCastException.html" title="class in java.lang">ClassCastException</a></code> - if <code>fromKey</code> and <code>toKey</code>
  1721. cannot be compared to one another using this map's comparator
  1722. (or, if the map has no comparator, using natural ordering).
  1723. Implementations may, but are not required to, throw this
  1724. exception if <code>fromKey</code> or <code>toKey</code>
  1725. cannot be compared to keys currently in the map.</dd>
  1726. <dd><code><a href="../../java/lang/NullPointerException.html" title="class in java.lang">NullPointerException</a></code> - if <code>fromKey</code> or <code>toKey</code> is
  1727. null and this map uses natural ordering, or its comparator
  1728. does not permit null keys</dd>
  1729. <dd><code><a href="../../java/lang/IllegalArgumentException.html" title="class in java.lang">IllegalArgumentException</a></code> - if <code>fromKey</code> is greater than
  1730. <code>toKey</code>; or if this map itself has a restricted
  1731. range, and <code>fromKey</code> or <code>toKey</code> lies
  1732. outside the bounds of the range</dd>
  1733. </dl>
  1734. </li>
  1735. </ul>
  1736. <a name="headMap-java.lang.Object-">
  1737. <!-- -->
  1738. </a><a name="headMap-K-">
  1739. <!-- -->
  1740. </a>
  1741. <ul class="blockList">
  1742. <li class="blockList">
  1743. <h4>headMap</h4>
  1744. <pre>public&nbsp;<a href="../../java/util/SortedMap.html" title="interface in java.util">SortedMap</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;&nbsp;headMap(<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>&nbsp;toKey)</pre>
  1745. <div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../java/util/NavigableMap.html#headMap-K-">NavigableMap</a></code></span></div>
  1746. <div class="block">Returns a view of the portion of this map whose keys are
  1747. strictly less than <code>toKey</code>. The returned map is backed
  1748. by this map, so changes in the returned map are reflected in
  1749. this map, and vice-versa. The returned map supports all
  1750. optional map operations that this map supports.
  1751. <p>The returned map will throw an <code>IllegalArgumentException</code>
  1752. on an attempt to insert a key outside its range.
  1753. <p>Equivalent to <code>headMap(toKey, false)</code>.</div>
  1754. <dl>
  1755. <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
  1756. <dd><code><a href="../../java/util/NavigableMap.html#headMap-K-">headMap</a></code>&nbsp;in interface&nbsp;<code><a href="../../java/util/NavigableMap.html" title="interface in java.util">NavigableMap</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></dd>
  1757. <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
  1758. <dd><code><a href="../../java/util/SortedMap.html#headMap-K-">headMap</a></code>&nbsp;in interface&nbsp;<code><a href="../../java/util/SortedMap.html" title="interface in java.util">SortedMap</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></dd>
  1759. <dt><span class="paramLabel">Parameters:</span></dt>
  1760. <dd><code>toKey</code> - high endpoint (exclusive) of the keys in the returned map</dd>
  1761. <dt><span class="returnLabel">Returns:</span></dt>
  1762. <dd>a view of the portion of this map whose keys are strictly
  1763. less than <code>toKey</code></dd>
  1764. <dt><span class="throwsLabel">Throws:</span></dt>
  1765. <dd><code><a href="../../java/lang/ClassCastException.html" title="class in java.lang">ClassCastException</a></code> - if <code>toKey</code> is not compatible
  1766. with this map's comparator (or, if the map has no comparator,
  1767. if <code>toKey</code> does not implement <a href="../../java/lang/Comparable.html" title="interface in java.lang"><code>Comparable</code></a>).
  1768. Implementations may, but are not required to, throw this
  1769. exception if <code>toKey</code> cannot be compared to keys
  1770. currently in the map.</dd>
  1771. <dd><code><a href="../../java/lang/NullPointerException.html" title="class in java.lang">NullPointerException</a></code> - if <code>toKey</code> is null
  1772. and this map uses natural ordering, or its comparator
  1773. does not permit null keys</dd>
  1774. <dd><code><a href="../../java/lang/IllegalArgumentException.html" title="class in java.lang">IllegalArgumentException</a></code> - if this map itself has a
  1775. restricted range, and <code>toKey</code> lies outside the
  1776. bounds of the range</dd>
  1777. </dl>
  1778. </li>
  1779. </ul>
  1780. <a name="tailMap-java.lang.Object-">
  1781. <!-- -->
  1782. </a><a name="tailMap-K-">
  1783. <!-- -->
  1784. </a>
  1785. <ul class="blockList">
  1786. <li class="blockList">
  1787. <h4>tailMap</h4>
  1788. <pre>public&nbsp;<a href="../../java/util/SortedMap.html" title="interface in java.util">SortedMap</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;&nbsp;tailMap(<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>&nbsp;fromKey)</pre>
  1789. <div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../java/util/NavigableMap.html#tailMap-K-">NavigableMap</a></code></span></div>
  1790. <div class="block">Returns a view of the portion of this map whose keys are
  1791. greater than or equal to <code>fromKey</code>. The returned map is
  1792. backed by this map, so changes in the returned map are
  1793. reflected in this map, and vice-versa. The returned map
  1794. supports all optional map operations that this map supports.
  1795. <p>The returned map will throw an <code>IllegalArgumentException</code>
  1796. on an attempt to insert a key outside its range.
  1797. <p>Equivalent to <code>tailMap(fromKey, true)</code>.</div>
  1798. <dl>
  1799. <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
  1800. <dd><code><a href="../../java/util/NavigableMap.html#tailMap-K-">tailMap</a></code>&nbsp;in interface&nbsp;<code><a href="../../java/util/NavigableMap.html" title="interface in java.util">NavigableMap</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></dd>
  1801. <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
  1802. <dd><code><a href="../../java/util/SortedMap.html#tailMap-K-">tailMap</a></code>&nbsp;in interface&nbsp;<code><a href="../../java/util/SortedMap.html" title="interface in java.util">SortedMap</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></dd>
  1803. <dt><span class="paramLabel">Parameters:</span></dt>
  1804. <dd><code>fromKey</code> - low endpoint (inclusive) of the keys in the returned map</dd>
  1805. <dt><span class="returnLabel">Returns:</span></dt>
  1806. <dd>a view of the portion of this map whose keys are greater
  1807. than or equal to <code>fromKey</code></dd>
  1808. <dt><span class="throwsLabel">Throws:</span></dt>
  1809. <dd><code><a href="../../java/lang/ClassCastException.html" title="class in java.lang">ClassCastException</a></code> - if <code>fromKey</code> is not compatible
  1810. with this map's comparator (or, if the map has no comparator,
  1811. if <code>fromKey</code> does not implement <a href="../../java/lang/Comparable.html" title="interface in java.lang"><code>Comparable</code></a>).
  1812. Implementations may, but are not required to, throw this
  1813. exception if <code>fromKey</code> cannot be compared to keys
  1814. currently in the map.</dd>
  1815. <dd><code><a href="../../java/lang/NullPointerException.html" title="class in java.lang">NullPointerException</a></code> - if <code>fromKey</code> is null
  1816. and this map uses natural ordering, or its comparator
  1817. does not permit null keys</dd>
  1818. <dd><code><a href="../../java/lang/IllegalArgumentException.html" title="class in java.lang">IllegalArgumentException</a></code> - if this map itself has a
  1819. restricted range, and <code>fromKey</code> lies outside the
  1820. bounds of the range</dd>
  1821. </dl>
  1822. </li>
  1823. </ul>
  1824. <a name="replace-java.lang.Object-java.lang.Object-java.lang.Object-">
  1825. <!-- -->
  1826. </a><a name="replace-K-V-V-">
  1827. <!-- -->
  1828. </a>
  1829. <ul class="blockList">
  1830. <li class="blockList">
  1831. <h4>replace</h4>
  1832. <pre>public&nbsp;boolean&nbsp;replace(<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>&nbsp;key,
  1833. <a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&nbsp;oldValue,
  1834. <a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&nbsp;newValue)</pre>
  1835. <div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../java/util/Map.html#replace-K-V-V-">Map</a></code></span></div>
  1836. <div class="block">Replaces the entry for the specified key only if currently
  1837. mapped to the specified value.</div>
  1838. <dl>
  1839. <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
  1840. <dd><code><a href="../../java/util/Map.html#replace-K-V-V-">replace</a></code>&nbsp;in interface&nbsp;<code><a href="../../java/util/Map.html" title="interface in java.util">Map</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></dd>
  1841. <dt><span class="paramLabel">Parameters:</span></dt>
  1842. <dd><code>key</code> - key with which the specified value is associated</dd>
  1843. <dd><code>oldValue</code> - value expected to be associated with the specified key</dd>
  1844. <dd><code>newValue</code> - value to be associated with the specified key</dd>
  1845. <dt><span class="returnLabel">Returns:</span></dt>
  1846. <dd><code>true</code> if the value was replaced</dd>
  1847. </dl>
  1848. </li>
  1849. </ul>
  1850. <a name="replace-java.lang.Object-java.lang.Object-">
  1851. <!-- -->
  1852. </a><a name="replace-K-V-">
  1853. <!-- -->
  1854. </a>
  1855. <ul class="blockList">
  1856. <li class="blockList">
  1857. <h4>replace</h4>
  1858. <pre>public&nbsp;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&nbsp;replace(<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>&nbsp;key,
  1859. <a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&nbsp;value)</pre>
  1860. <div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../java/util/Map.html#replace-K-V-">Map</a></code></span></div>
  1861. <div class="block">Replaces the entry for the specified key only if it is
  1862. currently mapped to some value.</div>
  1863. <dl>
  1864. <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
  1865. <dd><code><a href="../../java/util/Map.html#replace-K-V-">replace</a></code>&nbsp;in interface&nbsp;<code><a href="../../java/util/Map.html" title="interface in java.util">Map</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></dd>
  1866. <dt><span class="paramLabel">Parameters:</span></dt>
  1867. <dd><code>key</code> - key with which the specified value is associated</dd>
  1868. <dd><code>value</code> - value to be associated with the specified key</dd>
  1869. <dt><span class="returnLabel">Returns:</span></dt>
  1870. <dd>the previous value associated with the specified key, or
  1871. <code>null</code> if there was no mapping for the key.
  1872. (A <code>null</code> return can also indicate that the map
  1873. previously associated <code>null</code> with the key,
  1874. if the implementation supports null values.)</dd>
  1875. </dl>
  1876. </li>
  1877. </ul>
  1878. <a name="forEach-java.util.function.BiConsumer-">
  1879. <!-- -->
  1880. </a>
  1881. <ul class="blockList">
  1882. <li class="blockList">
  1883. <h4>forEach</h4>
  1884. <pre>public&nbsp;void&nbsp;forEach(<a href="../../java/util/function/BiConsumer.html" title="interface in java.util.function">BiConsumer</a>&lt;? super <a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,? super <a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;&nbsp;action)</pre>
  1885. <div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../java/util/Map.html#forEach-java.util.function.BiConsumer-">Map</a></code></span></div>
  1886. <div class="block">Performs the given action for each entry in this map until all entries
  1887. have been processed or the action throws an exception. Unless
  1888. otherwise specified by the implementing class, actions are performed in
  1889. the order of entry set iteration (if an iteration order is specified.)
  1890. Exceptions thrown by the action are relayed to the caller.</div>
  1891. <dl>
  1892. <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
  1893. <dd><code><a href="../../java/util/Map.html#forEach-java.util.function.BiConsumer-">forEach</a></code>&nbsp;in interface&nbsp;<code><a href="../../java/util/Map.html" title="interface in java.util">Map</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></dd>
  1894. <dt><span class="paramLabel">Parameters:</span></dt>
  1895. <dd><code>action</code> - The action to be performed for each entry</dd>
  1896. </dl>
  1897. </li>
  1898. </ul>
  1899. <a name="replaceAll-java.util.function.BiFunction-">
  1900. <!-- -->
  1901. </a>
  1902. <ul class="blockListLast">
  1903. <li class="blockList">
  1904. <h4>replaceAll</h4>
  1905. <pre>public&nbsp;void&nbsp;replaceAll(<a href="../../java/util/function/BiFunction.html" title="interface in java.util.function">BiFunction</a>&lt;? super <a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,? super <a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>,? extends <a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;&nbsp;function)</pre>
  1906. <div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../java/util/Map.html#replaceAll-java.util.function.BiFunction-">Map</a></code></span></div>
  1907. <div class="block">Replaces each entry's value with the result of invoking the given
  1908. function on that entry until all entries have been processed or the
  1909. function throws an exception. Exceptions thrown by the function are
  1910. relayed to the caller.</div>
  1911. <dl>
  1912. <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
  1913. <dd><code><a href="../../java/util/Map.html#replaceAll-java.util.function.BiFunction-">replaceAll</a></code>&nbsp;in interface&nbsp;<code><a href="../../java/util/Map.html" title="interface in java.util">Map</a>&lt;<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">K</a>,<a href="../../java/util/TreeMap.html" title="type parameter in TreeMap">V</a>&gt;</code></dd>
  1914. <dt><span class="paramLabel">Parameters:</span></dt>
  1915. <dd><code>function</code> - the function to apply to each entry</dd>
  1916. </dl>
  1917. </li>
  1918. </ul>
  1919. </li>
  1920. </ul>
  1921. </li>
  1922. </ul>
  1923. </div>
  1924. </div>
  1925. <!-- ========= END OF CLASS DATA ========= -->
  1926. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  1927. <div class="bottomNav"><a name="navbar.bottom">
  1928. <!-- -->
  1929. </a>
  1930. <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
  1931. <a name="navbar.bottom.firstrow">
  1932. <!-- -->
  1933. </a>
  1934. <ul class="navList" title="Navigation">
  1935. <li><a href="../../overview-summary.html">Overview</a></li>
  1936. <li><a href="package-summary.html">Package</a></li>
  1937. <li class="navBarCell1Rev">Class</li>
  1938. <li><a href="class-use/TreeMap.html">Use</a></li>
  1939. <li><a href="package-tree.html">Tree</a></li>
  1940. <li><a href="../../deprecated-list.html">Deprecated</a></li>
  1941. <li><a href="../../index-files/index-1.html">Index</a></li>
  1942. <li><a href="../../help-doc.html">Help</a></li>
  1943. </ul>
  1944. <div class="aboutLanguage"><strong>Java&trade;&nbsp;Platform<br>Standard&nbsp;Ed.&nbsp;8</strong></div>
  1945. </div>
  1946. <div class="subNav">
  1947. <ul class="navList">
  1948. <li><a href="../../java/util/TooManyListenersException.html" title="class in java.util"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
  1949. <li><a href="../../java/util/TreeSet.html" title="class in java.util"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
  1950. </ul>
  1951. <ul class="navList">
  1952. <li><a href="../../index.html?java/util/TreeMap.html" target="_top">Frames</a></li>
  1953. <li><a href="TreeMap.html" target="_top">No&nbsp;Frames</a></li>
  1954. </ul>
  1955. <ul class="navList" id="allclasses_navbar_bottom">
  1956. <li><a href="../../allclasses-noframe.html">All&nbsp;Classes</a></li>
  1957. </ul>
  1958. <div>
  1959. <script type="text/javascript"><!--
  1960. allClassesLink = document.getElementById("allclasses_navbar_bottom");
  1961. if(window==top) {
  1962. allClassesLink.style.display = "block";
  1963. }
  1964. else {
  1965. allClassesLink.style.display = "none";
  1966. }
  1967. //-->
  1968. </script>
  1969. </div>
  1970. <div>
  1971. <ul class="subNavList">
  1972. <li>Summary:&nbsp;</li>
  1973. <li><a href="#nested.classes.inherited.from.class.java.util.AbstractMap">Nested</a>&nbsp;|&nbsp;</li>
  1974. <li>Field&nbsp;|&nbsp;</li>
  1975. <li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
  1976. <li><a href="#method.summary">Method</a></li>
  1977. </ul>
  1978. <ul class="subNavList">
  1979. <li>Detail:&nbsp;</li>
  1980. <li>Field&nbsp;|&nbsp;</li>
  1981. <li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
  1982. <li><a href="#method.detail">Method</a></li>
  1983. </ul>
  1984. </div>
  1985. <a name="skip.navbar.bottom">
  1986. <!-- -->
  1987. </a></div>
  1988. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  1989. <p class="legalCopy"><small><font size="-1"> <a href="http://bugreport.sun.com/bugreport/">Submit a bug or feature</a> <br>For further API reference and developer documentation, see <a href="http://download.oracle.com/javase/8/docs/index.html" target="_blank">Java SE Documentation</a>. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.<br> <a href="../../../legal/cpyr.html">Copyright</a> &#x00a9; 1993, 2015, Oracle and/or its affiliates. All rights reserved. </font></small></p>
  1990. </body>
  1991. </html>