Subversion Repositories AndroidProjects

Rev

Details | Last modification | View Log | RSS feed

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