1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
5 <!-- Generated by javadoc (build 1.5.0_07) on Fri Apr 11 15:39:17 BST 2008 -->
6 <META http-equiv=
"Content-Type" content=
"text/html; charset=ISO-8859-1">
8 FastTreeMap (Commons Collections
3.2.1 API)
11 <META NAME=
"keywords" CONTENT=
"org.apache.commons.collections.FastTreeMap class">
13 <LINK REL =
"stylesheet" TYPE=
"text/css" HREF=
"../../../../stylesheet.css" TITLE=
"Style">
15 <SCRIPT type=
"text/javascript">
16 function windowTitle()
18 parent.document.
title=
"FastTreeMap (Commons Collections 3.2.1 API)";
26 <BODY BGCOLOR=
"white" onload=
"windowTitle();">
29 <!-- ========= START OF TOP NAVBAR ======= -->
30 <A NAME=
"navbar_top"><!-- --></A>
31 <A HREF=
"#skip-navbar_top" title=
"Skip navigation links"></A>
32 <TABLE BORDER=
"0" WIDTH=
"100%" CELLPADDING=
"1" CELLSPACING=
"0" SUMMARY=
"">
34 <TD COLSPAN=
2 BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1">
35 <A NAME=
"navbar_top_firstrow"><!-- --></A>
36 <TABLE BORDER=
"0" CELLPADDING=
"0" CELLSPACING=
"3" SUMMARY=
"">
37 <TR ALIGN=
"center" VALIGN=
"top">
38 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"../../../../overview-summary.html"><FONT CLASS=
"NavBarFont1"><B>Overview
</B></FONT></A> </TD>
39 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"package-summary.html"><FONT CLASS=
"NavBarFont1"><B>Package
</B></FONT></A> </TD>
40 <TD BGCOLOR=
"#FFFFFF" CLASS=
"NavBarCell1Rev"> <FONT CLASS=
"NavBarFont1Rev"><B>Class
</B></FONT> </TD>
41 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"class-use/FastTreeMap.html"><FONT CLASS=
"NavBarFont1"><B>Use
</B></FONT></A> </TD>
42 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"package-tree.html"><FONT CLASS=
"NavBarFont1"><B>Tree
</B></FONT></A> </TD>
43 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"../../../../deprecated-list.html"><FONT CLASS=
"NavBarFont1"><B>Deprecated
</B></FONT></A> </TD>
44 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"../../../../index-all.html"><FONT CLASS=
"NavBarFont1"><B>Index
</B></FONT></A> </TD>
45 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"../../../../help-doc.html"><FONT CLASS=
"NavBarFont1"><B>Help
</B></FONT></A> </TD>
49 <TD ALIGN=
"right" VALIGN=
"top" ROWSPAN=
3><EM>
55 <TD BGCOLOR=
"white" CLASS=
"NavBarCell2"><FONT SIZE=
"-2">
56 <A HREF=
"../../../../org/apache/commons/collections/FastHashMap.html" title=
"class in org.apache.commons.collections"><B>PREV CLASS
</B></A>
57 <A HREF=
"../../../../org/apache/commons/collections/FunctorException.html" title=
"class in org.apache.commons.collections"><B>NEXT CLASS
</B></A></FONT></TD>
58 <TD BGCOLOR=
"white" CLASS=
"NavBarCell2"><FONT SIZE=
"-2">
59 <A HREF=
"../../../../index.html?org/apache/commons/collections/FastTreeMap.html" target=
"_top"><B>FRAMES
</B></A>
60 <A HREF=
"FastTreeMap.html" target=
"_top"><B>NO FRAMES
</B></A>
61 <SCRIPT type=
"text/javascript">
64 document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
69 <A HREF=
"../../../../allclasses-noframe.html"><B>All Classes
</B></A>
76 <TD VALIGN=
"top" CLASS=
"NavBarCell3"><FONT SIZE=
"-2">
77 SUMMARY:
NESTED
|
<A HREF=
"#field_summary">FIELD
</A> |
<A HREF=
"#constructor_summary">CONSTR
</A> |
<A HREF=
"#method_summary">METHOD
</A></FONT></TD>
78 <TD VALIGN=
"top" CLASS=
"NavBarCell3"><FONT SIZE=
"-2">
79 DETAIL:
<A HREF=
"#field_detail">FIELD
</A> |
<A HREF=
"#constructor_detail">CONSTR
</A> |
<A HREF=
"#method_detail">METHOD
</A></FONT></TD>
82 <A NAME=
"skip-navbar_top"></A>
83 <!-- ========= END OF TOP NAVBAR ========= -->
86 <!-- ======== START OF CLASS DATA ======== -->
89 org.apache.commons.collections
</FONT>
91 Class FastTreeMap
</H2>
94 <IMG SRC=
"../../../../resources/inherit.gif" ALT=
"extended by ">java.util.AbstractMap
95 <IMG SRC=
"../../../../resources/inherit.gif" ALT=
"extended by ">java.util.TreeMap
96 <IMG SRC=
"../../../../resources/inherit.gif" ALT=
"extended by "><B>org.apache.commons.collections.FastTreeMap
</B>
99 <DT><B>All Implemented Interfaces:
</B> <DD>java.io.Serializable, java.lang.Cloneable, java.util.Map, java.util.SortedMap
</DD>
103 <DT><PRE>public class
<B>FastTreeMap
</B><DT>extends java.util.TreeMap
</DL>
107 <p>A customized implementation of
<code>java.util.TreeMap
</code> designed
108 to operate in a multithreaded environment where the large majority of
109 method calls are read-only, instead of structural changes. When operating
110 in
"fast" mode, read calls are non-synchronized and write calls perform the
113 <li>Clone the existing collection
114 <li>Perform the modification on the clone
115 <li>Replace the existing collection with the (modified) clone
117 <p>When first created, objects of this class default to
"slow" mode, where
118 all accesses of any type are synchronized but no cloning takes place. This
119 is appropriate for initially populating the collection, followed by a switch
120 to
"fast" mode (by calling
<code>setFast(true)
</code>) after initialization
123 <p><strong>NOTE
</strong>: If you are creating and accessing a
124 <code>TreeMap
</code> only within a single thread, you should use
125 <code>java.util.TreeMap
</code> directly (with no synchronization), for
126 maximum performance.
</p>
128 <p><strong>NOTE
</strong>:
<i>This class is not cross-platform.
129 Using it may cause unexpected failures on some architectures.
</i>
130 It suffers from the same problems as the double-checked locking idiom.
131 In particular, the instruction that clones the internal collection and the
132 instruction that sets the internal reference to the clone can be executed
133 or perceived out-of-order. This means that any read operation might fail
134 unexpectedly, as it may be reading the state of the internal collection
135 before the internal collection is fully formed.
136 For more information on the double-checked locking idiom, see the
137 <a href=
"http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html">
138 Double-Checked Locking Idiom Is Broken Declaration
</a>.
</p>
143 <DT><B>Since:
</B></DT>
144 <DD>Commons Collections
1.0</DD>
145 <DT><B>Version:
</B></DT>
146 <DD>$Revision:
646777 $ $Date:
2008-
04-
10 13:
33:
15 +
0100 (Thu,
10 Apr
2008) $
</DD>
147 <DT><B>Author:
</B></DT>
148 <DD>Craig R. McClanahan, Stephen Colebourne
</DD>
149 <DT><B>See Also:
</B><DD><A HREF=
"../../../../serialized-form.html#org.apache.commons.collections.FastTreeMap">Serialized Form
</A></DL>
153 <!-- =========== FIELD SUMMARY =========== -->
155 <A NAME=
"field_summary"><!-- --></A>
156 <TABLE BORDER=
"1" WIDTH=
"100%" CELLPADDING=
"3" CELLSPACING=
"0" SUMMARY=
"">
157 <TR BGCOLOR=
"#CCCCFF" CLASS=
"TableHeadingColor">
158 <TH ALIGN=
"left" COLSPAN=
"2"><FONT SIZE=
"+2">
159 <B>Field Summary
</B></FONT></TH>
161 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
162 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
163 <CODE>protected
boolean
</CODE></FONT></TD>
164 <TD><CODE><B><A HREF=
"../../../../org/apache/commons/collections/FastTreeMap.html#fast">fast
</A></B></CODE>
167 Are we operating in
"fast" mode?
</TD>
169 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
170 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
171 <CODE>protected
java.util.TreeMap
</CODE></FONT></TD>
172 <TD><CODE><B><A HREF=
"../../../../org/apache/commons/collections/FastTreeMap.html#map">map
</A></B></CODE>
175 The underlying map we are managing.
</TD>
179 <!-- ======== CONSTRUCTOR SUMMARY ======== -->
181 <A NAME=
"constructor_summary"><!-- --></A>
182 <TABLE BORDER=
"1" WIDTH=
"100%" CELLPADDING=
"3" CELLSPACING=
"0" SUMMARY=
"">
183 <TR BGCOLOR=
"#CCCCFF" CLASS=
"TableHeadingColor">
184 <TH ALIGN=
"left" COLSPAN=
"2"><FONT SIZE=
"+2">
185 <B>Constructor Summary
</B></FONT></TH>
187 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
188 <TD><CODE><B><A HREF=
"../../../../org/apache/commons/collections/FastTreeMap.html#FastTreeMap()">FastTreeMap
</A></B>()
</CODE>
191 Construct a an empty map.
</TD>
193 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
194 <TD><CODE><B><A HREF=
"../../../../org/apache/commons/collections/FastTreeMap.html#FastTreeMap(java.util.Comparator)">FastTreeMap
</A></B>(java.util.Comparator
comparator)
</CODE>
197 Construct an empty map with the specified comparator.
</TD>
199 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
200 <TD><CODE><B><A HREF=
"../../../../org/apache/commons/collections/FastTreeMap.html#FastTreeMap(java.util.Map)">FastTreeMap
</A></B>(java.util.Map
map)
</CODE>
203 Construct a new map with the same mappings as the specified map,
204 sorted according to the keys's natural order
</TD>
206 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
207 <TD><CODE><B><A HREF=
"../../../../org/apache/commons/collections/FastTreeMap.html#FastTreeMap(java.util.SortedMap)">FastTreeMap
</A></B>(java.util.SortedMap
map)
</CODE>
210 Construct a new map with the same mappings as the specified map,
211 sorted according to the same ordering
</TD>
215 <!-- ========== METHOD SUMMARY =========== -->
217 <A NAME=
"method_summary"><!-- --></A>
218 <TABLE BORDER=
"1" WIDTH=
"100%" CELLPADDING=
"3" CELLSPACING=
"0" SUMMARY=
"">
219 <TR BGCOLOR=
"#CCCCFF" CLASS=
"TableHeadingColor">
220 <TH ALIGN=
"left" COLSPAN=
"2"><FONT SIZE=
"+2">
221 <B>Method Summary
</B></FONT></TH>
223 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
224 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
225 <CODE> void
</CODE></FONT></TD>
226 <TD><CODE><B><A HREF=
"../../../../org/apache/commons/collections/FastTreeMap.html#clear()">clear
</A></B>()
</CODE>
229 Remove all mappings from this map.
</TD>
231 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
232 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
233 <CODE> java.lang.Object
</CODE></FONT></TD>
234 <TD><CODE><B><A HREF=
"../../../../org/apache/commons/collections/FastTreeMap.html#clone()">clone
</A></B>()
</CODE>
237 Return a shallow copy of this
<code>FastTreeMap
</code> instance.
</TD>
239 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
240 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
241 <CODE> java.util.Comparator
</CODE></FONT></TD>
242 <TD><CODE><B><A HREF=
"../../../../org/apache/commons/collections/FastTreeMap.html#comparator()">comparator
</A></B>()
</CODE>
245 Return the comparator used to order this map, or
<code>null
</code>
246 if this map uses its keys' natural order.
</TD>
248 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
249 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
250 <CODE> boolean
</CODE></FONT></TD>
251 <TD><CODE><B><A HREF=
"../../../../org/apache/commons/collections/FastTreeMap.html#containsKey(java.lang.Object)">containsKey
</A></B>(java.lang.Object
key)
</CODE>
254 Return
<code>true
</code> if this map contains a mapping for the
257 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
258 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
259 <CODE> boolean
</CODE></FONT></TD>
260 <TD><CODE><B><A HREF=
"../../../../org/apache/commons/collections/FastTreeMap.html#containsValue(java.lang.Object)">containsValue
</A></B>(java.lang.Object
value)
</CODE>
263 Return
<code>true
</code> if this map contains one or more keys mapping
264 to the specified value.
</TD>
266 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
267 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
268 <CODE> java.util.Set
</CODE></FONT></TD>
269 <TD><CODE><B><A HREF=
"../../../../org/apache/commons/collections/FastTreeMap.html#entrySet()">entrySet
</A></B>()
</CODE>
272 Return a collection view of the mappings contained in this map.
</TD>
274 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
275 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
276 <CODE> boolean
</CODE></FONT></TD>
277 <TD><CODE><B><A HREF=
"../../../../org/apache/commons/collections/FastTreeMap.html#equals(java.lang.Object)">equals
</A></B>(java.lang.Object
o)
</CODE>
280 Compare the specified object with this list for equality.
</TD>
282 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
283 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
284 <CODE> java.lang.Object
</CODE></FONT></TD>
285 <TD><CODE><B><A HREF=
"../../../../org/apache/commons/collections/FastTreeMap.html#firstKey()">firstKey
</A></B>()
</CODE>
288 Return the first (lowest) key currently in this sorted map.
</TD>
290 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
291 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
292 <CODE> java.lang.Object
</CODE></FONT></TD>
293 <TD><CODE><B><A HREF=
"../../../../org/apache/commons/collections/FastTreeMap.html#get(java.lang.Object)">get
</A></B>(java.lang.Object
key)
</CODE>
296 Return the value to which this map maps the specified key.
</TD>
298 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
299 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
300 <CODE> boolean
</CODE></FONT></TD>
301 <TD><CODE><B><A HREF=
"../../../../org/apache/commons/collections/FastTreeMap.html#getFast()">getFast
</A></B>()
</CODE>
304 Returns true if this map is operating in fast mode.
</TD>
306 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
307 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
308 <CODE> int
</CODE></FONT></TD>
309 <TD><CODE><B><A HREF=
"../../../../org/apache/commons/collections/FastTreeMap.html#hashCode()">hashCode
</A></B>()
</CODE>
312 Return the hash code value for this map.
</TD>
314 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
315 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
316 <CODE> java.util.SortedMap
</CODE></FONT></TD>
317 <TD><CODE><B><A HREF=
"../../../../org/apache/commons/collections/FastTreeMap.html#headMap(java.lang.Object)">headMap
</A></B>(java.lang.Object
key)
</CODE>
320 Return a view of the portion of this map whose keys are strictly
321 less than the specified key.
</TD>
323 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
324 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
325 <CODE> boolean
</CODE></FONT></TD>
326 <TD><CODE><B><A HREF=
"../../../../org/apache/commons/collections/FastTreeMap.html#isEmpty()">isEmpty
</A></B>()
</CODE>
329 Return
<code>true
</code> if this map contains no mappings.
</TD>
331 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
332 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
333 <CODE> java.util.Set
</CODE></FONT></TD>
334 <TD><CODE><B><A HREF=
"../../../../org/apache/commons/collections/FastTreeMap.html#keySet()">keySet
</A></B>()
</CODE>
337 Return a set view of the keys contained in this map.
</TD>
339 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
340 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
341 <CODE> java.lang.Object
</CODE></FONT></TD>
342 <TD><CODE><B><A HREF=
"../../../../org/apache/commons/collections/FastTreeMap.html#lastKey()">lastKey
</A></B>()
</CODE>
345 Return the last (highest) key currently in this sorted map.
</TD>
347 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
348 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
349 <CODE> java.lang.Object
</CODE></FONT></TD>
350 <TD><CODE><B><A HREF=
"../../../../org/apache/commons/collections/FastTreeMap.html#put(java.lang.Object, java.lang.Object)">put
</A></B>(java.lang.Object
key,
351 java.lang.Object
value)
</CODE>
354 Associate the specified value with the specified key in this map.
</TD>
356 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
357 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
358 <CODE> void
</CODE></FONT></TD>
359 <TD><CODE><B><A HREF=
"../../../../org/apache/commons/collections/FastTreeMap.html#putAll(java.util.Map)">putAll
</A></B>(java.util.Map
in)
</CODE>
362 Copy all of the mappings from the specified map to this one, replacing
363 any mappings with the same keys.
</TD>
365 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
366 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
367 <CODE> java.lang.Object
</CODE></FONT></TD>
368 <TD><CODE><B><A HREF=
"../../../../org/apache/commons/collections/FastTreeMap.html#remove(java.lang.Object)">remove
</A></B>(java.lang.Object
key)
</CODE>
371 Remove any mapping for this key, and return any previously
374 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
375 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
376 <CODE> void
</CODE></FONT></TD>
377 <TD><CODE><B><A HREF=
"../../../../org/apache/commons/collections/FastTreeMap.html#setFast(boolean)">setFast
</A></B>(boolean
fast)
</CODE>
380 Sets whether this map is operating in fast mode.
</TD>
382 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
383 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
384 <CODE> int
</CODE></FONT></TD>
385 <TD><CODE><B><A HREF=
"../../../../org/apache/commons/collections/FastTreeMap.html#size()">size
</A></B>()
</CODE>
388 Return the number of key-value mappings in this map.
</TD>
390 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
391 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
392 <CODE> java.util.SortedMap
</CODE></FONT></TD>
393 <TD><CODE><B><A HREF=
"../../../../org/apache/commons/collections/FastTreeMap.html#subMap(java.lang.Object, java.lang.Object)">subMap
</A></B>(java.lang.Object
fromKey,
394 java.lang.Object
toKey)
</CODE>
397 Return a view of the portion of this map whose keys are in the
398 range fromKey (inclusive) to toKey (exclusive).
</TD>
400 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
401 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
402 <CODE> java.util.SortedMap
</CODE></FONT></TD>
403 <TD><CODE><B><A HREF=
"../../../../org/apache/commons/collections/FastTreeMap.html#tailMap(java.lang.Object)">tailMap
</A></B>(java.lang.Object
key)
</CODE>
406 Return a view of the portion of this map whose keys are greater than
407 or equal to the specified key.
</TD>
409 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
410 <TD ALIGN=
"right" VALIGN=
"top" WIDTH=
"1%"><FONT SIZE=
"-1">
411 <CODE> java.util.Collection
</CODE></FONT></TD>
412 <TD><CODE><B><A HREF=
"../../../../org/apache/commons/collections/FastTreeMap.html#values()">values
</A></B>()
</CODE>
415 Return a collection view of the values contained in this map.
</TD>
418 <A NAME=
"methods_inherited_from_class_java.util.AbstractMap"><!-- --></A>
419 <TABLE BORDER=
"1" WIDTH=
"100%" CELLPADDING=
"3" CELLSPACING=
"0" SUMMARY=
"">
420 <TR BGCOLOR=
"#EEEEFF" CLASS=
"TableSubHeadingColor">
421 <TH ALIGN=
"left"><B>Methods inherited from class java.util.AbstractMap
</B></TH>
423 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
424 <TD><CODE>toString
</CODE></TD>
427 <A NAME=
"methods_inherited_from_class_java.lang.Object"><!-- --></A>
428 <TABLE BORDER=
"1" WIDTH=
"100%" CELLPADDING=
"3" CELLSPACING=
"0" SUMMARY=
"">
429 <TR BGCOLOR=
"#EEEEFF" CLASS=
"TableSubHeadingColor">
430 <TH ALIGN=
"left"><B>Methods inherited from class java.lang.Object
</B></TH>
432 <TR BGCOLOR=
"white" CLASS=
"TableRowColor">
433 <TD><CODE>finalize, getClass, notify, notifyAll, wait, wait, wait
</CODE></TD>
439 <!-- ============ FIELD DETAIL =========== -->
441 <A NAME=
"field_detail"><!-- --></A>
442 <TABLE BORDER=
"1" WIDTH=
"100%" CELLPADDING=
"3" CELLSPACING=
"0" SUMMARY=
"">
443 <TR BGCOLOR=
"#CCCCFF" CLASS=
"TableHeadingColor">
444 <TH ALIGN=
"left" COLSPAN=
"1"><FONT SIZE=
"+2">
445 <B>Field Detail
</B></FONT></TH>
449 <A NAME=
"map"><!-- --></A><H3>
452 protected java.util.TreeMap
<B>map
</B></PRE>
454 <DD>The underlying map we are managing.
461 <A NAME=
"fast"><!-- --></A><H3>
464 protected boolean
<B>fast
</B></PRE>
466 <DD>Are we operating in
"fast" mode?
472 <!-- ========= CONSTRUCTOR DETAIL ======== -->
474 <A NAME=
"constructor_detail"><!-- --></A>
475 <TABLE BORDER=
"1" WIDTH=
"100%" CELLPADDING=
"3" CELLSPACING=
"0" SUMMARY=
"">
476 <TR BGCOLOR=
"#CCCCFF" CLASS=
"TableHeadingColor">
477 <TH ALIGN=
"left" COLSPAN=
"1"><FONT SIZE=
"+2">
478 <B>Constructor Detail
</B></FONT></TH>
482 <A NAME=
"FastTreeMap()"><!-- --></A><H3>
485 public
<B>FastTreeMap
</B>()
</PRE>
487 <DD>Construct a an empty map.
492 <A NAME=
"FastTreeMap(java.util.Comparator)"><!-- --></A><H3>
495 public
<B>FastTreeMap
</B>(java.util.Comparator
comparator)
</PRE>
497 <DD>Construct an empty map with the specified comparator.
500 <DT><B>Parameters:
</B><DD><CODE>comparator
</CODE> - the comparator to use for ordering tree elements
</DL>
504 <A NAME=
"FastTreeMap(java.util.Map)"><!-- --></A><H3>
507 public
<B>FastTreeMap
</B>(java.util.Map
map)
</PRE>
509 <DD>Construct a new map with the same mappings as the specified map,
510 sorted according to the keys's natural order
513 <DT><B>Parameters:
</B><DD><CODE>map
</CODE> - the map whose mappings are to be copied
</DL>
517 <A NAME=
"FastTreeMap(java.util.SortedMap)"><!-- --></A><H3>
520 public
<B>FastTreeMap
</B>(java.util.SortedMap
map)
</PRE>
522 <DD>Construct a new map with the same mappings as the specified map,
523 sorted according to the same ordering
526 <DT><B>Parameters:
</B><DD><CODE>map
</CODE> - the map whose mappings are to be copied
</DL>
529 <!-- ============ METHOD DETAIL ========== -->
531 <A NAME=
"method_detail"><!-- --></A>
532 <TABLE BORDER=
"1" WIDTH=
"100%" CELLPADDING=
"3" CELLSPACING=
"0" SUMMARY=
"">
533 <TR BGCOLOR=
"#CCCCFF" CLASS=
"TableHeadingColor">
534 <TH ALIGN=
"left" COLSPAN=
"1"><FONT SIZE=
"+2">
535 <B>Method Detail
</B></FONT></TH>
539 <A NAME=
"getFast()"><!-- --></A><H3>
542 public boolean
<B>getFast
</B>()
</PRE>
544 <DD>Returns true if this map is operating in fast mode.
548 <DT><B>Returns:
</B><DD>true if this map is operating in fast mode
</DL>
553 <A NAME=
"setFast(boolean)"><!-- --></A><H3>
556 public void
<B>setFast
</B>(boolean
fast)
</PRE>
558 <DD>Sets whether this map is operating in fast mode.
561 <DT><B>Parameters:
</B><DD><CODE>fast
</CODE> - true if this map should operate in fast mode
</DL>
566 <A NAME=
"get(java.lang.Object)"><!-- --></A><H3>
569 public java.lang.Object
<B>get
</B>(java.lang.Object
key)
</PRE>
571 <DD>Return the value to which this map maps the specified key. Returns
572 <code>null
</code> if the map contains no mapping for this key, or if
573 there is a mapping with a value of
<code>null
</code>. Use the
574 <code>containsKey()
</code> method to disambiguate these cases.
577 <DT><B>Specified by:
</B><DD><CODE>get
</CODE> in interface
<CODE>java.util.Map
</CODE><DT><B>Overrides:
</B><DD><CODE>get
</CODE> in class
<CODE>java.util.TreeMap
</CODE></DL>
580 <DT><B>Parameters:
</B><DD><CODE>key
</CODE> - the key whose value is to be returned
581 <DT><B>Returns:
</B><DD>the value mapped to that key, or null
</DL>
586 <A NAME=
"size()"><!-- --></A><H3>
589 public int
<B>size
</B>()
</PRE>
591 <DD>Return the number of key-value mappings in this map.
594 <DT><B>Specified by:
</B><DD><CODE>size
</CODE> in interface
<CODE>java.util.Map
</CODE><DT><B>Overrides:
</B><DD><CODE>size
</CODE> in class
<CODE>java.util.TreeMap
</CODE></DL>
598 <DT><B>Returns:
</B><DD>the current size of the map
</DL>
603 <A NAME=
"isEmpty()"><!-- --></A><H3>
606 public boolean
<B>isEmpty
</B>()
</PRE>
608 <DD>Return
<code>true
</code> if this map contains no mappings.
611 <DT><B>Specified by:
</B><DD><CODE>isEmpty
</CODE> in interface
<CODE>java.util.Map
</CODE><DT><B>Overrides:
</B><DD><CODE>isEmpty
</CODE> in class
<CODE>java.util.AbstractMap
</CODE></DL>
615 <DT><B>Returns:
</B><DD>is the map currently empty
</DL>
620 <A NAME=
"containsKey(java.lang.Object)"><!-- --></A><H3>
623 public boolean
<B>containsKey
</B>(java.lang.Object
key)
</PRE>
625 <DD>Return
<code>true
</code> if this map contains a mapping for the
629 <DT><B>Specified by:
</B><DD><CODE>containsKey
</CODE> in interface
<CODE>java.util.Map
</CODE><DT><B>Overrides:
</B><DD><CODE>containsKey
</CODE> in class
<CODE>java.util.TreeMap
</CODE></DL>
632 <DT><B>Parameters:
</B><DD><CODE>key
</CODE> - the key to be searched for
633 <DT><B>Returns:
</B><DD>true if the map contains the key
</DL>
638 <A NAME=
"containsValue(java.lang.Object)"><!-- --></A><H3>
641 public boolean
<B>containsValue
</B>(java.lang.Object
value)
</PRE>
643 <DD>Return
<code>true
</code> if this map contains one or more keys mapping
644 to the specified value.
647 <DT><B>Specified by:
</B><DD><CODE>containsValue
</CODE> in interface
<CODE>java.util.Map
</CODE><DT><B>Overrides:
</B><DD><CODE>containsValue
</CODE> in class
<CODE>java.util.TreeMap
</CODE></DL>
650 <DT><B>Parameters:
</B><DD><CODE>value
</CODE> - the value to be searched for
651 <DT><B>Returns:
</B><DD>true if the map contains the value
</DL>
656 <A NAME=
"comparator()"><!-- --></A><H3>
659 public java.util.Comparator
<B>comparator
</B>()
</PRE>
661 <DD>Return the comparator used to order this map, or
<code>null
</code>
662 if this map uses its keys' natural order.
665 <DT><B>Specified by:
</B><DD><CODE>comparator
</CODE> in interface
<CODE>java.util.SortedMap
</CODE><DT><B>Overrides:
</B><DD><CODE>comparator
</CODE> in class
<CODE>java.util.TreeMap
</CODE></DL>
669 <DT><B>Returns:
</B><DD>the comparator used to order the map, or null if natural order
</DL>
674 <A NAME=
"firstKey()"><!-- --></A><H3>
677 public java.lang.Object
<B>firstKey
</B>()
</PRE>
679 <DD>Return the first (lowest) key currently in this sorted map.
682 <DT><B>Specified by:
</B><DD><CODE>firstKey
</CODE> in interface
<CODE>java.util.SortedMap
</CODE><DT><B>Overrides:
</B><DD><CODE>firstKey
</CODE> in class
<CODE>java.util.TreeMap
</CODE></DL>
686 <DT><B>Returns:
</B><DD>the first key in the map
</DL>
691 <A NAME=
"lastKey()"><!-- --></A><H3>
694 public java.lang.Object
<B>lastKey
</B>()
</PRE>
696 <DD>Return the last (highest) key currently in this sorted map.
699 <DT><B>Specified by:
</B><DD><CODE>lastKey
</CODE> in interface
<CODE>java.util.SortedMap
</CODE><DT><B>Overrides:
</B><DD><CODE>lastKey
</CODE> in class
<CODE>java.util.TreeMap
</CODE></DL>
703 <DT><B>Returns:
</B><DD>the last key in the map
</DL>
708 <A NAME=
"put(java.lang.Object, java.lang.Object)"><!-- --></A><H3>
711 public java.lang.Object
<B>put
</B>(java.lang.Object
key,
712 java.lang.Object
value)
</PRE>
714 <DD>Associate the specified value with the specified key in this map.
715 If the map previously contained a mapping for this key, the old
716 value is replaced and returned.
719 <DT><B>Specified by:
</B><DD><CODE>put
</CODE> in interface
<CODE>java.util.Map
</CODE><DT><B>Overrides:
</B><DD><CODE>put
</CODE> in class
<CODE>java.util.TreeMap
</CODE></DL>
722 <DT><B>Parameters:
</B><DD><CODE>key
</CODE> - the key with which the value is to be associated
<DD><CODE>value
</CODE> - the value to be associated with this key
723 <DT><B>Returns:
</B><DD>the value previously mapped to the key, or null
</DL>
728 <A NAME=
"putAll(java.util.Map)"><!-- --></A><H3>
731 public void
<B>putAll
</B>(java.util.Map
in)
</PRE>
733 <DD>Copy all of the mappings from the specified map to this one, replacing
734 any mappings with the same keys.
737 <DT><B>Specified by:
</B><DD><CODE>putAll
</CODE> in interface
<CODE>java.util.Map
</CODE><DT><B>Overrides:
</B><DD><CODE>putAll
</CODE> in class
<CODE>java.util.TreeMap
</CODE></DL>
740 <DT><B>Parameters:
</B><DD><CODE>in
</CODE> - the map whose mappings are to be copied
</DL>
745 <A NAME=
"remove(java.lang.Object)"><!-- --></A><H3>
748 public java.lang.Object
<B>remove
</B>(java.lang.Object
key)
</PRE>
750 <DD>Remove any mapping for this key, and return any previously
754 <DT><B>Specified by:
</B><DD><CODE>remove
</CODE> in interface
<CODE>java.util.Map
</CODE><DT><B>Overrides:
</B><DD><CODE>remove
</CODE> in class
<CODE>java.util.TreeMap
</CODE></DL>
757 <DT><B>Parameters:
</B><DD><CODE>key
</CODE> - the key whose mapping is to be removed
758 <DT><B>Returns:
</B><DD>the value removed, or null
</DL>
763 <A NAME=
"clear()"><!-- --></A><H3>
766 public void
<B>clear
</B>()
</PRE>
768 <DD>Remove all mappings from this map.
771 <DT><B>Specified by:
</B><DD><CODE>clear
</CODE> in interface
<CODE>java.util.Map
</CODE><DT><B>Overrides:
</B><DD><CODE>clear
</CODE> in class
<CODE>java.util.TreeMap
</CODE></DL>
779 <A NAME=
"equals(java.lang.Object)"><!-- --></A><H3>
782 public boolean
<B>equals
</B>(java.lang.Object
o)
</PRE>
784 <DD>Compare the specified object with this list for equality. This
785 implementation uses exactly the code that is used to define the
786 list equals function in the documentation for the
787 <code>Map.equals
</code> method.
790 <DT><B>Specified by:
</B><DD><CODE>equals
</CODE> in interface
<CODE>java.util.Map
</CODE><DT><B>Overrides:
</B><DD><CODE>equals
</CODE> in class
<CODE>java.util.AbstractMap
</CODE></DL>
793 <DT><B>Parameters:
</B><DD><CODE>o
</CODE> - the object to be compared to this list
794 <DT><B>Returns:
</B><DD>true if the two maps are equal
</DL>
799 <A NAME=
"hashCode()"><!-- --></A><H3>
802 public int
<B>hashCode
</B>()
</PRE>
804 <DD>Return the hash code value for this map. This implementation uses
805 exactly the code that is used to define the list hash function in the
806 documentation for the
<code>Map.hashCode
</code> method.
809 <DT><B>Specified by:
</B><DD><CODE>hashCode
</CODE> in interface
<CODE>java.util.Map
</CODE><DT><B>Overrides:
</B><DD><CODE>hashCode
</CODE> in class
<CODE>java.util.AbstractMap
</CODE></DL>
813 <DT><B>Returns:
</B><DD>a suitable integer hash code
</DL>
818 <A NAME=
"clone()"><!-- --></A><H3>
821 public java.lang.Object
<B>clone
</B>()
</PRE>
823 <DD>Return a shallow copy of this
<code>FastTreeMap
</code> instance.
824 The keys and values themselves are not copied.
827 <DT><B>Overrides:
</B><DD><CODE>clone
</CODE> in class
<CODE>java.util.TreeMap
</CODE></DL>
831 <DT><B>Returns:
</B><DD>a clone of this map
</DL>
836 <A NAME=
"headMap(java.lang.Object)"><!-- --></A><H3>
839 public java.util.SortedMap
<B>headMap
</B>(java.lang.Object
key)
</PRE>
841 <DD>Return a view of the portion of this map whose keys are strictly
842 less than the specified key.
845 <DT><B>Specified by:
</B><DD><CODE>headMap
</CODE> in interface
<CODE>java.util.SortedMap
</CODE><DT><B>Overrides:
</B><DD><CODE>headMap
</CODE> in class
<CODE>java.util.TreeMap
</CODE></DL>
848 <DT><B>Parameters:
</B><DD><CODE>key
</CODE> - Key higher than any in the returned map
849 <DT><B>Returns:
</B><DD>a head map
</DL>
854 <A NAME=
"subMap(java.lang.Object, java.lang.Object)"><!-- --></A><H3>
857 public java.util.SortedMap
<B>subMap
</B>(java.lang.Object
fromKey,
858 java.lang.Object
toKey)
</PRE>
860 <DD>Return a view of the portion of this map whose keys are in the
861 range fromKey (inclusive) to toKey (exclusive).
864 <DT><B>Specified by:
</B><DD><CODE>subMap
</CODE> in interface
<CODE>java.util.SortedMap
</CODE><DT><B>Overrides:
</B><DD><CODE>subMap
</CODE> in class
<CODE>java.util.TreeMap
</CODE></DL>
867 <DT><B>Parameters:
</B><DD><CODE>fromKey
</CODE> - Lower limit of keys for the returned map
<DD><CODE>toKey
</CODE> - Upper limit of keys for the returned map
868 <DT><B>Returns:
</B><DD>a sub map
</DL>
873 <A NAME=
"tailMap(java.lang.Object)"><!-- --></A><H3>
876 public java.util.SortedMap
<B>tailMap
</B>(java.lang.Object
key)
</PRE>
878 <DD>Return a view of the portion of this map whose keys are greater than
879 or equal to the specified key.
882 <DT><B>Specified by:
</B><DD><CODE>tailMap
</CODE> in interface
<CODE>java.util.SortedMap
</CODE><DT><B>Overrides:
</B><DD><CODE>tailMap
</CODE> in class
<CODE>java.util.TreeMap
</CODE></DL>
885 <DT><B>Parameters:
</B><DD><CODE>key
</CODE> - Key less than or equal to any in the returned map
886 <DT><B>Returns:
</B><DD>a tail map
</DL>
891 <A NAME=
"entrySet()"><!-- --></A><H3>
894 public java.util.Set
<B>entrySet
</B>()
</PRE>
896 <DD>Return a collection view of the mappings contained in this map. Each
897 element in the returned collection is a
<code>Map.Entry
</code>.
900 <DT><B>Specified by:
</B><DD><CODE>entrySet
</CODE> in interface
<CODE>java.util.Map
</CODE><DT><B>Overrides:
</B><DD><CODE>entrySet
</CODE> in class
<CODE>java.util.TreeMap
</CODE></DL>
908 <A NAME=
"keySet()"><!-- --></A><H3>
911 public java.util.Set
<B>keySet
</B>()
</PRE>
913 <DD>Return a set view of the keys contained in this map.
916 <DT><B>Specified by:
</B><DD><CODE>keySet
</CODE> in interface
<CODE>java.util.Map
</CODE><DT><B>Overrides:
</B><DD><CODE>keySet
</CODE> in class
<CODE>java.util.TreeMap
</CODE></DL>
924 <A NAME=
"values()"><!-- --></A><H3>
927 public java.util.Collection
<B>values
</B>()
</PRE>
929 <DD>Return a collection view of the values contained in this map.
932 <DT><B>Specified by:
</B><DD><CODE>values
</CODE> in interface
<CODE>java.util.Map
</CODE><DT><B>Overrides:
</B><DD><CODE>values
</CODE> in class
<CODE>java.util.TreeMap
</CODE></DL>
938 <!-- ========= END OF CLASS DATA ========= -->
942 <!-- ======= START OF BOTTOM NAVBAR ====== -->
943 <A NAME=
"navbar_bottom"><!-- --></A>
944 <A HREF=
"#skip-navbar_bottom" title=
"Skip navigation links"></A>
945 <TABLE BORDER=
"0" WIDTH=
"100%" CELLPADDING=
"1" CELLSPACING=
"0" SUMMARY=
"">
947 <TD COLSPAN=
2 BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1">
948 <A NAME=
"navbar_bottom_firstrow"><!-- --></A>
949 <TABLE BORDER=
"0" CELLPADDING=
"0" CELLSPACING=
"3" SUMMARY=
"">
950 <TR ALIGN=
"center" VALIGN=
"top">
951 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"../../../../overview-summary.html"><FONT CLASS=
"NavBarFont1"><B>Overview
</B></FONT></A> </TD>
952 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"package-summary.html"><FONT CLASS=
"NavBarFont1"><B>Package
</B></FONT></A> </TD>
953 <TD BGCOLOR=
"#FFFFFF" CLASS=
"NavBarCell1Rev"> <FONT CLASS=
"NavBarFont1Rev"><B>Class
</B></FONT> </TD>
954 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"class-use/FastTreeMap.html"><FONT CLASS=
"NavBarFont1"><B>Use
</B></FONT></A> </TD>
955 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"package-tree.html"><FONT CLASS=
"NavBarFont1"><B>Tree
</B></FONT></A> </TD>
956 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"../../../../deprecated-list.html"><FONT CLASS=
"NavBarFont1"><B>Deprecated
</B></FONT></A> </TD>
957 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"../../../../index-all.html"><FONT CLASS=
"NavBarFont1"><B>Index
</B></FONT></A> </TD>
958 <TD BGCOLOR=
"#EEEEFF" CLASS=
"NavBarCell1"> <A HREF=
"../../../../help-doc.html"><FONT CLASS=
"NavBarFont1"><B>Help
</B></FONT></A> </TD>
962 <TD ALIGN=
"right" VALIGN=
"top" ROWSPAN=
3><EM>
968 <TD BGCOLOR=
"white" CLASS=
"NavBarCell2"><FONT SIZE=
"-2">
969 <A HREF=
"../../../../org/apache/commons/collections/FastHashMap.html" title=
"class in org.apache.commons.collections"><B>PREV CLASS
</B></A>
970 <A HREF=
"../../../../org/apache/commons/collections/FunctorException.html" title=
"class in org.apache.commons.collections"><B>NEXT CLASS
</B></A></FONT></TD>
971 <TD BGCOLOR=
"white" CLASS=
"NavBarCell2"><FONT SIZE=
"-2">
972 <A HREF=
"../../../../index.html?org/apache/commons/collections/FastTreeMap.html" target=
"_top"><B>FRAMES
</B></A>
973 <A HREF=
"FastTreeMap.html" target=
"_top"><B>NO FRAMES
</B></A>
974 <SCRIPT type=
"text/javascript">
977 document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
982 <A HREF=
"../../../../allclasses-noframe.html"><B>All Classes
</B></A>
989 <TD VALIGN=
"top" CLASS=
"NavBarCell3"><FONT SIZE=
"-2">
990 SUMMARY:
NESTED
|
<A HREF=
"#field_summary">FIELD
</A> |
<A HREF=
"#constructor_summary">CONSTR
</A> |
<A HREF=
"#method_summary">METHOD
</A></FONT></TD>
991 <TD VALIGN=
"top" CLASS=
"NavBarCell3"><FONT SIZE=
"-2">
992 DETAIL:
<A HREF=
"#field_detail">FIELD
</A> |
<A HREF=
"#constructor_detail">CONSTR
</A> |
<A HREF=
"#method_detail">METHOD
</A></FONT></TD>
995 <A NAME=
"skip-navbar_bottom"></A>
996 <!-- ======== END OF BOTTOM NAVBAR ======= -->
999 Copyright ©
2001-
2008 <a href=
"http://www.apache.org/">The Apache Software Foundation
</a>. All Rights Reserved.