Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 1107 | chris | 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 (version 1.7.0_17) on Sun Nov 03 15:35:44 CET 2013 --> |
||
| 6 | <title>LongMap (libgdx API)</title> |
||
| 7 | <meta name="date" content="2013-11-03"> |
||
| 8 | <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> |
||
| 9 | </head> |
||
| 10 | <body> |
||
| 11 | <script type="text/javascript"><!-- |
||
| 12 | if (location.href.indexOf('is-external=true') == -1) { |
||
| 13 | parent.document.title="LongMap (libgdx API)"; |
||
| 14 | } |
||
| 15 | //--> |
||
| 16 | </script> |
||
| 17 | <noscript> |
||
| 18 | <div>JavaScript is disabled on your browser.</div> |
||
| 19 | </noscript> |
||
| 20 | <!-- ========= START OF TOP NAVBAR ======= --> |
||
| 21 | <div class="topNav"><a name="navbar_top"> |
||
| 22 | <!-- --> |
||
| 23 | </a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> |
||
| 24 | <!-- --> |
||
| 25 | </a> |
||
| 26 | <ul class="navList" title="Navigation"> |
||
| 27 | <li><a href="../../../../overview-summary.html">Overview</a></li> |
||
| 28 | <li><a href="package-summary.html">Package</a></li> |
||
| 29 | <li class="navBarCell1Rev">Class</li> |
||
| 30 | <li><a href="class-use/LongMap.html">Use</a></li> |
||
| 31 | <li><a href="package-tree.html">Tree</a></li> |
||
| 32 | <li><a href="../../../../deprecated-list.html">Deprecated</a></li> |
||
| 33 | <li><a href="../../../../index-all.html">Index</a></li> |
||
| 34 | <li><a href="../../../../help-doc.html">Help</a></li> |
||
| 35 | </ul> |
||
| 36 | <div class="aboutLanguage"><em> |
||
| 37 | libgdx API |
||
| 38 | <style> |
||
| 39 | body, td, th { font-family:Helvetica, Tahoma, Arial, sans-serif; font-size:10pt } |
||
| 40 | pre, code, tt { font-size:9pt; font-family:Lucida Console, Courier New, sans-serif } |
||
| 41 | h1, h2, h3, .FrameTitleFont, .FrameHeadingFont, .TableHeadingColor font { font-size:105%; font-weight:bold } |
||
| 42 | .TableHeadingColor { background:#EEEEFF; } |
||
| 43 | a { text-decoration:none } |
||
| 44 | a:hover { text-decoration:underline } |
||
| 45 | a:link, a:visited { color:blue } |
||
| 46 | table { border:0px } |
||
| 47 | .TableRowColor td:first-child { border-left:1px solid black } |
||
| 48 | .TableRowColor td { border:0px; border-bottom:1px solid black; border-right:1px solid black } |
||
| 49 | hr { border:0px; border-bottom:1px solid #333366; } |
||
| 50 | </style> |
||
| 51 | </em></div> |
||
| 52 | </div> |
||
| 53 | <div class="subNav"> |
||
| 54 | <ul class="navList"> |
||
| 55 | <li><a href="../../../../com/badlogic/gdx/utils/LongArray.html" title="class in com.badlogic.gdx.utils"><span class="strong">Prev Class</span></a></li> |
||
| 56 | <li><a href="../../../../com/badlogic/gdx/utils/LongMap.Entries.html" title="class in com.badlogic.gdx.utils"><span class="strong">Next Class</span></a></li> |
||
| 57 | </ul> |
||
| 58 | <ul class="navList"> |
||
| 59 | <li><a href="../../../../index.html?com/badlogic/gdx/utils/LongMap.html" target="_top">Frames</a></li> |
||
| 60 | <li><a href="LongMap.html" target="_top">No Frames</a></li> |
||
| 61 | </ul> |
||
| 62 | <ul class="navList" id="allclasses_navbar_top"> |
||
| 63 | <li><a href="../../../../allclasses-noframe.html">All Classes</a></li> |
||
| 64 | </ul> |
||
| 65 | <div> |
||
| 66 | <script type="text/javascript"><!-- |
||
| 67 | allClassesLink = document.getElementById("allclasses_navbar_top"); |
||
| 68 | if(window==top) { |
||
| 69 | allClassesLink.style.display = "block"; |
||
| 70 | } |
||
| 71 | else { |
||
| 72 | allClassesLink.style.display = "none"; |
||
| 73 | } |
||
| 74 | //--> |
||
| 75 | </script> |
||
| 76 | </div> |
||
| 77 | <div> |
||
| 78 | <ul class="subNavList"> |
||
| 79 | <li>Summary: </li> |
||
| 80 | <li><a href="#nested_class_summary">Nested</a> | </li> |
||
| 81 | <li><a href="#field_summary">Field</a> | </li> |
||
| 82 | <li><a href="#constructor_summary">Constr</a> | </li> |
||
| 83 | <li><a href="#method_summary">Method</a></li> |
||
| 84 | </ul> |
||
| 85 | <ul class="subNavList"> |
||
| 86 | <li>Detail: </li> |
||
| 87 | <li><a href="#field_detail">Field</a> | </li> |
||
| 88 | <li><a href="#constructor_detail">Constr</a> | </li> |
||
| 89 | <li><a href="#method_detail">Method</a></li> |
||
| 90 | </ul> |
||
| 91 | </div> |
||
| 92 | <a name="skip-navbar_top"> |
||
| 93 | <!-- --> |
||
| 94 | </a></div> |
||
| 95 | <!-- ========= END OF TOP NAVBAR ========= --> |
||
| 96 | <!-- ======== START OF CLASS DATA ======== --> |
||
| 97 | <div class="header"> |
||
| 98 | <div class="subTitle">com.badlogic.gdx.utils</div> |
||
| 99 | <h2 title="Class LongMap" class="title">Class LongMap<V></h2> |
||
| 100 | </div> |
||
| 101 | <div class="contentContainer"> |
||
| 102 | <ul class="inheritance"> |
||
| 103 | <li>java.lang.Object</li> |
||
| 104 | <li> |
||
| 105 | <ul class="inheritance"> |
||
| 106 | <li>com.badlogic.gdx.utils.LongMap<V></li> |
||
| 107 | </ul> |
||
| 108 | </li> |
||
| 109 | </ul> |
||
| 110 | <div class="description"> |
||
| 111 | <ul class="blockList"> |
||
| 112 | <li class="blockList"> |
||
| 113 | <hr> |
||
| 114 | <br> |
||
| 115 | <pre>public class <span class="strong">LongMap<V></span> |
||
| 116 | extends java.lang.Object</pre> |
||
| 117 | <div class="block">An unordered map that uses long keys. This implementation is a cuckoo hash map using 3 hashes, random walking, and a small |
||
| 118 | stash for problematic keys. Null values are allowed. No allocation is done except when growing the table size. <br> |
||
| 119 | <br> |
||
| 120 | This map performs very fast get, containsKey, and remove (typically O(1), worst case O(log(n))). Put may be a bit slower, |
||
| 121 | depending on hash collisions. Load factors greater than 0.91 greatly increase the chances the map will have to rehash to the |
||
| 122 | next higher POT size.</div> |
||
| 123 | <dl><dt><span class="strong">Author:</span></dt> |
||
| 124 | <dd>Nathan Sweet</dd></dl> |
||
| 125 | </li> |
||
| 126 | </ul> |
||
| 127 | </div> |
||
| 128 | <div class="summary"> |
||
| 129 | <ul class="blockList"> |
||
| 130 | <li class="blockList"> |
||
| 131 | <!-- ======== NESTED CLASS SUMMARY ======== --> |
||
| 132 | <ul class="blockList"> |
||
| 133 | <li class="blockList"><a name="nested_class_summary"> |
||
| 134 | <!-- --> |
||
| 135 | </a> |
||
| 136 | <h3>Nested Class Summary</h3> |
||
| 137 | <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation"> |
||
| 138 | <caption><span>Nested Classes</span><span class="tabEnd"> </span></caption> |
||
| 139 | <tr> |
||
| 140 | <th class="colFirst" scope="col">Modifier and Type</th> |
||
| 141 | <th class="colLast" scope="col">Class and Description</th> |
||
| 142 | </tr> |
||
| 143 | <tr class="altColor"> |
||
| 144 | <td class="colFirst"><code>static class </code></td> |
||
| 145 | <td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/utils/LongMap.Entries.html" title="class in com.badlogic.gdx.utils">LongMap.Entries</a><<a href="../../../../com/badlogic/gdx/utils/LongMap.Entries.html" title="type parameter in LongMap.Entries">V</a>></strong></code> </td> |
||
| 146 | </tr> |
||
| 147 | <tr class="rowColor"> |
||
| 148 | <td class="colFirst"><code>static class </code></td> |
||
| 149 | <td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/utils/LongMap.Entry.html" title="class in com.badlogic.gdx.utils">LongMap.Entry</a><<a href="../../../../com/badlogic/gdx/utils/LongMap.Entry.html" title="type parameter in LongMap.Entry">V</a>></strong></code> </td> |
||
| 150 | </tr> |
||
| 151 | <tr class="altColor"> |
||
| 152 | <td class="colFirst"><code>static class </code></td> |
||
| 153 | <td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/utils/LongMap.Keys.html" title="class in com.badlogic.gdx.utils">LongMap.Keys</a></strong></code> </td> |
||
| 154 | </tr> |
||
| 155 | <tr class="rowColor"> |
||
| 156 | <td class="colFirst"><code>static class </code></td> |
||
| 157 | <td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/utils/LongMap.Values.html" title="class in com.badlogic.gdx.utils">LongMap.Values</a><<a href="../../../../com/badlogic/gdx/utils/LongMap.Values.html" title="type parameter in LongMap.Values">V</a>></strong></code> </td> |
||
| 158 | </tr> |
||
| 159 | </table> |
||
| 160 | </li> |
||
| 161 | </ul> |
||
| 162 | <!-- =========== FIELD SUMMARY =========== --> |
||
| 163 | <ul class="blockList"> |
||
| 164 | <li class="blockList"><a name="field_summary"> |
||
| 165 | <!-- --> |
||
| 166 | </a> |
||
| 167 | <h3>Field Summary</h3> |
||
| 168 | <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation"> |
||
| 169 | <caption><span>Fields</span><span class="tabEnd"> </span></caption> |
||
| 170 | <tr> |
||
| 171 | <th class="colFirst" scope="col">Modifier and Type</th> |
||
| 172 | <th class="colLast" scope="col">Field and Description</th> |
||
| 173 | </tr> |
||
| 174 | <tr class="altColor"> |
||
| 175 | <td class="colFirst"><code>int</code></td> |
||
| 176 | <td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/utils/LongMap.html#size">size</a></strong></code> </td> |
||
| 177 | </tr> |
||
| 178 | </table> |
||
| 179 | </li> |
||
| 180 | </ul> |
||
| 181 | <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
||
| 182 | <ul class="blockList"> |
||
| 183 | <li class="blockList"><a name="constructor_summary"> |
||
| 184 | <!-- --> |
||
| 185 | </a> |
||
| 186 | <h3>Constructor Summary</h3> |
||
| 187 | <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> |
||
| 188 | <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
||
| 189 | <tr> |
||
| 190 | <th class="colOne" scope="col">Constructor and Description</th> |
||
| 191 | </tr> |
||
| 192 | <tr class="altColor"> |
||
| 193 | <td class="colOne"><code><strong><a href="../../../../com/badlogic/gdx/utils/LongMap.html#LongMap()">LongMap</a></strong>()</code> |
||
| 194 | <div class="block">Creates a new map with an initial capacity of 32 and a load factor of 0.8.</div> |
||
| 195 | </td> |
||
| 196 | </tr> |
||
| 197 | <tr class="rowColor"> |
||
| 198 | <td class="colOne"><code><strong><a href="../../../../com/badlogic/gdx/utils/LongMap.html#LongMap(int)">LongMap</a></strong>(int initialCapacity)</code> |
||
| 199 | <div class="block">Creates a new map with a load factor of 0.8.</div> |
||
| 200 | </td> |
||
| 201 | </tr> |
||
| 202 | <tr class="altColor"> |
||
| 203 | <td class="colOne"><code><strong><a href="../../../../com/badlogic/gdx/utils/LongMap.html#LongMap(int, float)">LongMap</a></strong>(int initialCapacity, |
||
| 204 | float loadFactor)</code> |
||
| 205 | <div class="block">Creates a new map with the specified initial capacity and load factor.</div> |
||
| 206 | </td> |
||
| 207 | </tr> |
||
| 208 | </table> |
||
| 209 | </li> |
||
| 210 | </ul> |
||
| 211 | <!-- ========== METHOD SUMMARY =========== --> |
||
| 212 | <ul class="blockList"> |
||
| 213 | <li class="blockList"><a name="method_summary"> |
||
| 214 | <!-- --> |
||
| 215 | </a> |
||
| 216 | <h3>Method Summary</h3> |
||
| 217 | <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
||
| 218 | <caption><span>Methods</span><span class="tabEnd"> </span></caption> |
||
| 219 | <tr> |
||
| 220 | <th class="colFirst" scope="col">Modifier and Type</th> |
||
| 221 | <th class="colLast" scope="col">Method and Description</th> |
||
| 222 | </tr> |
||
| 223 | <tr class="altColor"> |
||
| 224 | <td class="colFirst"><code>void</code></td> |
||
| 225 | <td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/utils/LongMap.html#clear()">clear</a></strong>()</code> </td> |
||
| 226 | </tr> |
||
| 227 | <tr class="rowColor"> |
||
| 228 | <td class="colFirst"><code>void</code></td> |
||
| 229 | <td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/utils/LongMap.html#clear(int)">clear</a></strong>(int maximumCapacity)</code> |
||
| 230 | <div class="block">Clears the map and reduces the size of the backing arrays to be the specified capacity if they are larger.</div> |
||
| 231 | </td> |
||
| 232 | </tr> |
||
| 233 | <tr class="altColor"> |
||
| 234 | <td class="colFirst"><code>boolean</code></td> |
||
| 235 | <td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/utils/LongMap.html#containsKey(long)">containsKey</a></strong>(long key)</code> </td> |
||
| 236 | </tr> |
||
| 237 | <tr class="rowColor"> |
||
| 238 | <td class="colFirst"><code>boolean</code></td> |
||
| 239 | <td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/utils/LongMap.html#containsValue(java.lang.Object, boolean)">containsValue</a></strong>(java.lang.Object value, |
||
| 240 | boolean identity)</code> |
||
| 241 | <div class="block">Returns true if the specified value is in the map.</div> |
||
| 242 | </td> |
||
| 243 | </tr> |
||
| 244 | <tr class="altColor"> |
||
| 245 | <td class="colFirst"><code>void</code></td> |
||
| 246 | <td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/utils/LongMap.html#ensureCapacity(int)">ensureCapacity</a></strong>(int additionalCapacity)</code> |
||
| 247 | <div class="block">Increases the size of the backing array to acommodate the specified number of additional items.</div> |
||
| 248 | </td> |
||
| 249 | </tr> |
||
| 250 | <tr class="rowColor"> |
||
| 251 | <td class="colFirst"><code><a href="../../../../com/badlogic/gdx/utils/LongMap.Entries.html" title="class in com.badlogic.gdx.utils">LongMap.Entries</a><<a href="../../../../com/badlogic/gdx/utils/LongMap.html" title="type parameter in LongMap">V</a>></code></td> |
||
| 252 | <td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/utils/LongMap.html#entries()">entries</a></strong>()</code> |
||
| 253 | <div class="block">Returns an iterator for the entries in the map.</div> |
||
| 254 | </td> |
||
| 255 | </tr> |
||
| 256 | <tr class="altColor"> |
||
| 257 | <td class="colFirst"><code>long</code></td> |
||
| 258 | <td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/utils/LongMap.html#findKey(java.lang.Object, boolean, long)">findKey</a></strong>(java.lang.Object value, |
||
| 259 | boolean identity, |
||
| 260 | long notFound)</code> |
||
| 261 | <div class="block">Returns the key for the specified value, or <tt>notFound</tt> if it is not in the map.</div> |
||
| 262 | </td> |
||
| 263 | </tr> |
||
| 264 | <tr class="rowColor"> |
||
| 265 | <td class="colFirst"><code><a href="../../../../com/badlogic/gdx/utils/LongMap.html" title="type parameter in LongMap">V</a></code></td> |
||
| 266 | <td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/utils/LongMap.html#get(long)">get</a></strong>(long key)</code> </td> |
||
| 267 | </tr> |
||
| 268 | <tr class="altColor"> |
||
| 269 | <td class="colFirst"><code><a href="../../../../com/badlogic/gdx/utils/LongMap.html" title="type parameter in LongMap">V</a></code></td> |
||
| 270 | <td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/utils/LongMap.html#get(long, V)">get</a></strong>(long key, |
||
| 271 | <a href="../../../../com/badlogic/gdx/utils/LongMap.html" title="type parameter in LongMap">V</a> defaultValue)</code> </td> |
||
| 272 | </tr> |
||
| 273 | <tr class="rowColor"> |
||
| 274 | <td class="colFirst"><code><a href="../../../../com/badlogic/gdx/utils/LongMap.Keys.html" title="class in com.badlogic.gdx.utils">LongMap.Keys</a></code></td> |
||
| 275 | <td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/utils/LongMap.html#keys()">keys</a></strong>()</code> |
||
| 276 | <div class="block">Returns an iterator for the keys in the map.</div> |
||
| 277 | </td> |
||
| 278 | </tr> |
||
| 279 | <tr class="altColor"> |
||
| 280 | <td class="colFirst"><code><a href="../../../../com/badlogic/gdx/utils/LongMap.html" title="type parameter in LongMap">V</a></code></td> |
||
| 281 | <td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/utils/LongMap.html#put(long, V)">put</a></strong>(long key, |
||
| 282 | <a href="../../../../com/badlogic/gdx/utils/LongMap.html" title="type parameter in LongMap">V</a> value)</code> </td> |
||
| 283 | </tr> |
||
| 284 | <tr class="rowColor"> |
||
| 285 | <td class="colFirst"><code>void</code></td> |
||
| 286 | <td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/utils/LongMap.html#putAll(com.badlogic.gdx.utils.LongMap)">putAll</a></strong>(<a href="../../../../com/badlogic/gdx/utils/LongMap.html" title="class in com.badlogic.gdx.utils">LongMap</a><<a href="../../../../com/badlogic/gdx/utils/LongMap.html" title="type parameter in LongMap">V</a>> map)</code> </td> |
||
| 287 | </tr> |
||
| 288 | <tr class="altColor"> |
||
| 289 | <td class="colFirst"><code><a href="../../../../com/badlogic/gdx/utils/LongMap.html" title="type parameter in LongMap">V</a></code></td> |
||
| 290 | <td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/utils/LongMap.html#remove(long)">remove</a></strong>(long key)</code> </td> |
||
| 291 | </tr> |
||
| 292 | <tr class="rowColor"> |
||
| 293 | <td class="colFirst"><code>void</code></td> |
||
| 294 | <td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/utils/LongMap.html#shrink(int)">shrink</a></strong>(int maximumCapacity)</code> |
||
| 295 | <div class="block">Reduces the size of the backing arrays to be the specified capacity or less.</div> |
||
| 296 | </td> |
||
| 297 | </tr> |
||
| 298 | <tr class="altColor"> |
||
| 299 | <td class="colFirst"><code>java.lang.String</code></td> |
||
| 300 | <td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/utils/LongMap.html#toString()">toString</a></strong>()</code> </td> |
||
| 301 | </tr> |
||
| 302 | <tr class="rowColor"> |
||
| 303 | <td class="colFirst"><code><a href="../../../../com/badlogic/gdx/utils/LongMap.Values.html" title="class in com.badlogic.gdx.utils">LongMap.Values</a><<a href="../../../../com/badlogic/gdx/utils/LongMap.html" title="type parameter in LongMap">V</a>></code></td> |
||
| 304 | <td class="colLast"><code><strong><a href="../../../../com/badlogic/gdx/utils/LongMap.html#values()">values</a></strong>()</code> |
||
| 305 | <div class="block">Returns an iterator for the values in the map.</div> |
||
| 306 | </td> |
||
| 307 | </tr> |
||
| 308 | </table> |
||
| 309 | <ul class="blockList"> |
||
| 310 | <li class="blockList"><a name="methods_inherited_from_class_java.lang.Object"> |
||
| 311 | <!-- --> |
||
| 312 | </a> |
||
| 313 | <h3>Methods inherited from class java.lang.Object</h3> |
||
| 314 | <code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</code></li> |
||
| 315 | </ul> |
||
| 316 | </li> |
||
| 317 | </ul> |
||
| 318 | </li> |
||
| 319 | </ul> |
||
| 320 | </div> |
||
| 321 | <div class="details"> |
||
| 322 | <ul class="blockList"> |
||
| 323 | <li class="blockList"> |
||
| 324 | <!-- ============ FIELD DETAIL =========== --> |
||
| 325 | <ul class="blockList"> |
||
| 326 | <li class="blockList"><a name="field_detail"> |
||
| 327 | <!-- --> |
||
| 328 | </a> |
||
| 329 | <h3>Field Detail</h3> |
||
| 330 | <a name="size"> |
||
| 331 | <!-- --> |
||
| 332 | </a> |
||
| 333 | <ul class="blockListLast"> |
||
| 334 | <li class="blockList"> |
||
| 335 | <h4>size</h4> |
||
| 336 | <pre>public int size</pre> |
||
| 337 | </li> |
||
| 338 | </ul> |
||
| 339 | </li> |
||
| 340 | </ul> |
||
| 341 | <!-- ========= CONSTRUCTOR DETAIL ======== --> |
||
| 342 | <ul class="blockList"> |
||
| 343 | <li class="blockList"><a name="constructor_detail"> |
||
| 344 | <!-- --> |
||
| 345 | </a> |
||
| 346 | <h3>Constructor Detail</h3> |
||
| 347 | <a name="LongMap()"> |
||
| 348 | <!-- --> |
||
| 349 | </a> |
||
| 350 | <ul class="blockList"> |
||
| 351 | <li class="blockList"> |
||
| 352 | <h4>LongMap</h4> |
||
| 353 | <pre>public LongMap()</pre> |
||
| 354 | <div class="block">Creates a new map with an initial capacity of 32 and a load factor of 0.8. This map will hold 25 items before growing the |
||
| 355 | backing table.</div> |
||
| 356 | </li> |
||
| 357 | </ul> |
||
| 358 | <a name="LongMap(int)"> |
||
| 359 | <!-- --> |
||
| 360 | </a> |
||
| 361 | <ul class="blockList"> |
||
| 362 | <li class="blockList"> |
||
| 363 | <h4>LongMap</h4> |
||
| 364 | <pre>public LongMap(int initialCapacity)</pre> |
||
| 365 | <div class="block">Creates a new map with a load factor of 0.8. This map will hold initialCapacity * 0.8 items before growing the backing |
||
| 366 | table.</div> |
||
| 367 | </li> |
||
| 368 | </ul> |
||
| 369 | <a name="LongMap(int, float)"> |
||
| 370 | <!-- --> |
||
| 371 | </a> |
||
| 372 | <ul class="blockListLast"> |
||
| 373 | <li class="blockList"> |
||
| 374 | <h4>LongMap</h4> |
||
| 375 | <pre>public LongMap(int initialCapacity, |
||
| 376 | float loadFactor)</pre> |
||
| 377 | <div class="block">Creates a new map with the specified initial capacity and load factor. This map will hold initialCapacity * loadFactor items |
||
| 378 | before growing the backing table.</div> |
||
| 379 | </li> |
||
| 380 | </ul> |
||
| 381 | </li> |
||
| 382 | </ul> |
||
| 383 | <!-- ============ METHOD DETAIL ========== --> |
||
| 384 | <ul class="blockList"> |
||
| 385 | <li class="blockList"><a name="method_detail"> |
||
| 386 | <!-- --> |
||
| 387 | </a> |
||
| 388 | <h3>Method Detail</h3> |
||
| 389 | <a name="put(long,java.lang.Object)"> |
||
| 390 | <!-- --> |
||
| 391 | </a><a name="put(long, V)"> |
||
| 392 | <!-- --> |
||
| 393 | </a> |
||
| 394 | <ul class="blockList"> |
||
| 395 | <li class="blockList"> |
||
| 396 | <h4>put</h4> |
||
| 397 | <pre>public <a href="../../../../com/badlogic/gdx/utils/LongMap.html" title="type parameter in LongMap">V</a> put(long key, |
||
| 398 | <a href="../../../../com/badlogic/gdx/utils/LongMap.html" title="type parameter in LongMap">V</a> value)</pre> |
||
| 399 | </li> |
||
| 400 | </ul> |
||
| 401 | <a name="putAll(com.badlogic.gdx.utils.LongMap)"> |
||
| 402 | <!-- --> |
||
| 403 | </a> |
||
| 404 | <ul class="blockList"> |
||
| 405 | <li class="blockList"> |
||
| 406 | <h4>putAll</h4> |
||
| 407 | <pre>public void putAll(<a href="../../../../com/badlogic/gdx/utils/LongMap.html" title="class in com.badlogic.gdx.utils">LongMap</a><<a href="../../../../com/badlogic/gdx/utils/LongMap.html" title="type parameter in LongMap">V</a>> map)</pre> |
||
| 408 | </li> |
||
| 409 | </ul> |
||
| 410 | <a name="get(long)"> |
||
| 411 | <!-- --> |
||
| 412 | </a> |
||
| 413 | <ul class="blockList"> |
||
| 414 | <li class="blockList"> |
||
| 415 | <h4>get</h4> |
||
| 416 | <pre>public <a href="../../../../com/badlogic/gdx/utils/LongMap.html" title="type parameter in LongMap">V</a> get(long key)</pre> |
||
| 417 | </li> |
||
| 418 | </ul> |
||
| 419 | <a name="get(long,java.lang.Object)"> |
||
| 420 | <!-- --> |
||
| 421 | </a><a name="get(long, V)"> |
||
| 422 | <!-- --> |
||
| 423 | </a> |
||
| 424 | <ul class="blockList"> |
||
| 425 | <li class="blockList"> |
||
| 426 | <h4>get</h4> |
||
| 427 | <pre>public <a href="../../../../com/badlogic/gdx/utils/LongMap.html" title="type parameter in LongMap">V</a> get(long key, |
||
| 428 | <a href="../../../../com/badlogic/gdx/utils/LongMap.html" title="type parameter in LongMap">V</a> defaultValue)</pre> |
||
| 429 | </li> |
||
| 430 | </ul> |
||
| 431 | <a name="remove(long)"> |
||
| 432 | <!-- --> |
||
| 433 | </a> |
||
| 434 | <ul class="blockList"> |
||
| 435 | <li class="blockList"> |
||
| 436 | <h4>remove</h4> |
||
| 437 | <pre>public <a href="../../../../com/badlogic/gdx/utils/LongMap.html" title="type parameter in LongMap">V</a> remove(long key)</pre> |
||
| 438 | </li> |
||
| 439 | </ul> |
||
| 440 | <a name="shrink(int)"> |
||
| 441 | <!-- --> |
||
| 442 | </a> |
||
| 443 | <ul class="blockList"> |
||
| 444 | <li class="blockList"> |
||
| 445 | <h4>shrink</h4> |
||
| 446 | <pre>public void shrink(int maximumCapacity)</pre> |
||
| 447 | <div class="block">Reduces the size of the backing arrays to be the specified capacity or less. If the capacity is already less, nothing is |
||
| 448 | done. If the map contains more items than the specified capacity, the next highest power of two capacity is used instead.</div> |
||
| 449 | </li> |
||
| 450 | </ul> |
||
| 451 | <a name="clear(int)"> |
||
| 452 | <!-- --> |
||
| 453 | </a> |
||
| 454 | <ul class="blockList"> |
||
| 455 | <li class="blockList"> |
||
| 456 | <h4>clear</h4> |
||
| 457 | <pre>public void clear(int maximumCapacity)</pre> |
||
| 458 | <div class="block">Clears the map and reduces the size of the backing arrays to be the specified capacity if they are larger.</div> |
||
| 459 | </li> |
||
| 460 | </ul> |
||
| 461 | <a name="clear()"> |
||
| 462 | <!-- --> |
||
| 463 | </a> |
||
| 464 | <ul class="blockList"> |
||
| 465 | <li class="blockList"> |
||
| 466 | <h4>clear</h4> |
||
| 467 | <pre>public void clear()</pre> |
||
| 468 | </li> |
||
| 469 | </ul> |
||
| 470 | <a name="containsValue(java.lang.Object, boolean)"> |
||
| 471 | <!-- --> |
||
| 472 | </a> |
||
| 473 | <ul class="blockList"> |
||
| 474 | <li class="blockList"> |
||
| 475 | <h4>containsValue</h4> |
||
| 476 | <pre>public boolean containsValue(java.lang.Object value, |
||
| 477 | boolean identity)</pre> |
||
| 478 | <div class="block">Returns true if the specified value is in the map. Note this traverses the entire map and compares every value, which may be |
||
| 479 | an expensive operation.</div> |
||
| 480 | </li> |
||
| 481 | </ul> |
||
| 482 | <a name="containsKey(long)"> |
||
| 483 | <!-- --> |
||
| 484 | </a> |
||
| 485 | <ul class="blockList"> |
||
| 486 | <li class="blockList"> |
||
| 487 | <h4>containsKey</h4> |
||
| 488 | <pre>public boolean containsKey(long key)</pre> |
||
| 489 | </li> |
||
| 490 | </ul> |
||
| 491 | <a name="findKey(java.lang.Object, boolean, long)"> |
||
| 492 | <!-- --> |
||
| 493 | </a> |
||
| 494 | <ul class="blockList"> |
||
| 495 | <li class="blockList"> |
||
| 496 | <h4>findKey</h4> |
||
| 497 | <pre>public long findKey(java.lang.Object value, |
||
| 498 | boolean identity, |
||
| 499 | long notFound)</pre> |
||
| 500 | <div class="block">Returns the key for the specified value, or <tt>notFound</tt> if it is not in the map. Note this traverses the entire map |
||
| 501 | and compares every value, which may be an expensive operation.</div> |
||
| 502 | <dl><dt><span class="strong">Parameters:</span></dt><dd><code>identity</code> - If true, uses == to compare the specified value with values in the map. If false, uses |
||
| 503 | <code>Object.equals(Object)</code>.</dd></dl> |
||
| 504 | </li> |
||
| 505 | </ul> |
||
| 506 | <a name="ensureCapacity(int)"> |
||
| 507 | <!-- --> |
||
| 508 | </a> |
||
| 509 | <ul class="blockList"> |
||
| 510 | <li class="blockList"> |
||
| 511 | <h4>ensureCapacity</h4> |
||
| 512 | <pre>public void ensureCapacity(int additionalCapacity)</pre> |
||
| 513 | <div class="block">Increases the size of the backing array to acommodate the specified number of additional items. Useful before adding many |
||
| 514 | items to avoid multiple backing array resizes.</div> |
||
| 515 | </li> |
||
| 516 | </ul> |
||
| 517 | <a name="toString()"> |
||
| 518 | <!-- --> |
||
| 519 | </a> |
||
| 520 | <ul class="blockList"> |
||
| 521 | <li class="blockList"> |
||
| 522 | <h4>toString</h4> |
||
| 523 | <pre>public java.lang.String toString()</pre> |
||
| 524 | <dl> |
||
| 525 | <dt><strong>Overrides:</strong></dt> |
||
| 526 | <dd><code>toString</code> in class <code>java.lang.Object</code></dd> |
||
| 527 | </dl> |
||
| 528 | </li> |
||
| 529 | </ul> |
||
| 530 | <a name="entries()"> |
||
| 531 | <!-- --> |
||
| 532 | </a> |
||
| 533 | <ul class="blockList"> |
||
| 534 | <li class="blockList"> |
||
| 535 | <h4>entries</h4> |
||
| 536 | <pre>public <a href="../../../../com/badlogic/gdx/utils/LongMap.Entries.html" title="class in com.badlogic.gdx.utils">LongMap.Entries</a><<a href="../../../../com/badlogic/gdx/utils/LongMap.html" title="type parameter in LongMap">V</a>> entries()</pre> |
||
| 537 | <div class="block">Returns an iterator for the entries in the map. Remove is supported. Note that the same iterator instance is returned each |
||
| 538 | time this method is called. Use the <a href="../../../../com/badlogic/gdx/utils/LongMap.Entries.html" title="class in com.badlogic.gdx.utils"><code>LongMap.Entries</code></a> constructor for nested or multithreaded iteration.</div> |
||
| 539 | </li> |
||
| 540 | </ul> |
||
| 541 | <a name="values()"> |
||
| 542 | <!-- --> |
||
| 543 | </a> |
||
| 544 | <ul class="blockList"> |
||
| 545 | <li class="blockList"> |
||
| 546 | <h4>values</h4> |
||
| 547 | <pre>public <a href="../../../../com/badlogic/gdx/utils/LongMap.Values.html" title="class in com.badlogic.gdx.utils">LongMap.Values</a><<a href="../../../../com/badlogic/gdx/utils/LongMap.html" title="type parameter in LongMap">V</a>> values()</pre> |
||
| 548 | <div class="block">Returns an iterator for the values in the map. Remove is supported. Note that the same iterator instance is returned each |
||
| 549 | time this method is called. Use the <a href="../../../../com/badlogic/gdx/utils/LongMap.Entries.html" title="class in com.badlogic.gdx.utils"><code>LongMap.Entries</code></a> constructor for nested or multithreaded iteration.</div> |
||
| 550 | </li> |
||
| 551 | </ul> |
||
| 552 | <a name="keys()"> |
||
| 553 | <!-- --> |
||
| 554 | </a> |
||
| 555 | <ul class="blockListLast"> |
||
| 556 | <li class="blockList"> |
||
| 557 | <h4>keys</h4> |
||
| 558 | <pre>public <a href="../../../../com/badlogic/gdx/utils/LongMap.Keys.html" title="class in com.badlogic.gdx.utils">LongMap.Keys</a> keys()</pre> |
||
| 559 | <div class="block">Returns an iterator for the keys in the map. Remove is supported. Note that the same iterator instance is returned each time |
||
| 560 | this method is called. Use the <a href="../../../../com/badlogic/gdx/utils/LongMap.Entries.html" title="class in com.badlogic.gdx.utils"><code>LongMap.Entries</code></a> constructor for nested or multithreaded iteration.</div> |
||
| 561 | </li> |
||
| 562 | </ul> |
||
| 563 | </li> |
||
| 564 | </ul> |
||
| 565 | </li> |
||
| 566 | </ul> |
||
| 567 | </div> |
||
| 568 | </div> |
||
| 569 | <!-- ========= END OF CLASS DATA ========= --> |
||
| 570 | <!-- ======= START OF BOTTOM NAVBAR ====== --> |
||
| 571 | <div class="bottomNav"><a name="navbar_bottom"> |
||
| 572 | <!-- --> |
||
| 573 | </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> |
||
| 574 | <!-- --> |
||
| 575 | </a> |
||
| 576 | <ul class="navList" title="Navigation"> |
||
| 577 | <li><a href="../../../../overview-summary.html">Overview</a></li> |
||
| 578 | <li><a href="package-summary.html">Package</a></li> |
||
| 579 | <li class="navBarCell1Rev">Class</li> |
||
| 580 | <li><a href="class-use/LongMap.html">Use</a></li> |
||
| 581 | <li><a href="package-tree.html">Tree</a></li> |
||
| 582 | <li><a href="../../../../deprecated-list.html">Deprecated</a></li> |
||
| 583 | <li><a href="../../../../index-all.html">Index</a></li> |
||
| 584 | <li><a href="../../../../help-doc.html">Help</a></li> |
||
| 585 | </ul> |
||
| 586 | <div class="aboutLanguage"><em>libgdx API</em></div> |
||
| 587 | </div> |
||
| 588 | <div class="subNav"> |
||
| 589 | <ul class="navList"> |
||
| 590 | <li><a href="../../../../com/badlogic/gdx/utils/LongArray.html" title="class in com.badlogic.gdx.utils"><span class="strong">Prev Class</span></a></li> |
||
| 591 | <li><a href="../../../../com/badlogic/gdx/utils/LongMap.Entries.html" title="class in com.badlogic.gdx.utils"><span class="strong">Next Class</span></a></li> |
||
| 592 | </ul> |
||
| 593 | <ul class="navList"> |
||
| 594 | <li><a href="../../../../index.html?com/badlogic/gdx/utils/LongMap.html" target="_top">Frames</a></li> |
||
| 595 | <li><a href="LongMap.html" target="_top">No Frames</a></li> |
||
| 596 | </ul> |
||
| 597 | <ul class="navList" id="allclasses_navbar_bottom"> |
||
| 598 | <li><a href="../../../../allclasses-noframe.html">All Classes</a></li> |
||
| 599 | </ul> |
||
| 600 | <div> |
||
| 601 | <script type="text/javascript"><!-- |
||
| 602 | allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
||
| 603 | if(window==top) { |
||
| 604 | allClassesLink.style.display = "block"; |
||
| 605 | } |
||
| 606 | else { |
||
| 607 | allClassesLink.style.display = "none"; |
||
| 608 | } |
||
| 609 | //--> |
||
| 610 | </script> |
||
| 611 | </div> |
||
| 612 | <div> |
||
| 613 | <ul class="subNavList"> |
||
| 614 | <li>Summary: </li> |
||
| 615 | <li><a href="#nested_class_summary">Nested</a> | </li> |
||
| 616 | <li><a href="#field_summary">Field</a> | </li> |
||
| 617 | <li><a href="#constructor_summary">Constr</a> | </li> |
||
| 618 | <li><a href="#method_summary">Method</a></li> |
||
| 619 | </ul> |
||
| 620 | <ul class="subNavList"> |
||
| 621 | <li>Detail: </li> |
||
| 622 | <li><a href="#field_detail">Field</a> | </li> |
||
| 623 | <li><a href="#constructor_detail">Constr</a> | </li> |
||
| 624 | <li><a href="#method_detail">Method</a></li> |
||
| 625 | </ul> |
||
| 626 | </div> |
||
| 627 | <a name="skip-navbar_bottom"> |
||
| 628 | <!-- --> |
||
| 629 | </a></div> |
||
| 630 | <!-- ======== END OF BOTTOM NAVBAR ======= --> |
||
| 631 | <p class="legalCopy"><small> |
||
| 632 | <div style="font-size:9pt"><i> |
||
| 633 | Copyright © 2010-2013 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com) |
||
| 634 | </i></div> |
||
| 635 | </small></p> |
||
| 636 | </body> |
||
| 637 | </html> |