Home | History | Annotate | Download | only in collect

Lines Matching full:code

104 A <A HREF="http://java.sun.com/javase/6/docs/api/java/util/concurrent/ConcurrentMap.html?is-external=true" title="class or interface in java.util.concurrent"><CODE>ConcurrentMap</CODE></A> builder, providing any combination of these
106 computation of values. Usage example: <pre> <code>ConcurrentMap&lt;Key, Graph&gt; graphs = new MapMaker()
116 });</code></pre>
118 These features are all optional; <code>new MapMaker().makeMap()</code>
120 <A HREF="http://java.sun.com/javase/6/docs/api/java/util/concurrent/ConcurrentHashMap.html?is-external=true" title="class or interface in java.util.concurrent"><CODE>ConcurrentHashMap</CODE></A>.
123 characteristics to <A HREF="http://java.sun.com/javase/6/docs/api/java/util/concurrent/ConcurrentHashMap.html?is-external=true" title="class or interface in java.util.concurrent"><CODE>ConcurrentHashMap</CODE></A>. It supports all optional
124 operations of the <code>ConcurrentMap</code> interface. It does not permit
129 (the <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang"><CODE>equals</CODE></A> method) to determine equality
130 for keys or values. However, if <A HREF="../../../../com/google/common/collect/MapMaker.html#weakKeys()"><CODE>weakKeys()</CODE></A> or <A HREF="../../../../com/google/common/collect/MapMaker.html#softKeys()"><CODE>softKeys()</CODE></A> was specified, the map uses identity (<code>==</code>)
131 comparisons instead for keys. Likewise, if <A HREF="../../../../com/google/common/collect/MapMaker.html#weakValues()"><CODE>weakValues()</CODE></A> or
132 <A HREF="../../../../com/google/common/collect/MapMaker.html#softValues()"><CODE>softValues()</CODE></A> was specified, the map uses identity comparisons
142 never observe a partially-reclaimed entry. Any <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.Entry.html?is-external=true" title="class or interface in java.util"><CODE>Map.Entry</CODE></A>
146 <p><code>new MapMaker().weakKeys().makeMap()</code> can almost always be
147 used as a drop-in replacement for <A HREF="http://java.sun.com/javase/6/docs/api/java/util/WeakHashMap.html?is-external=true" title="class or interface in java.util"><CODE>WeakHashMap</CODE></A>, adding
172 <TD><CODE><B><A HREF="../../../../com/google/common/collect/MapMaker.html#MapMaker()">MapMaker</A></B>()</CODE>
175 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs a new <code>MapMaker</code> instance with default settings,
190 <CODE>&nbsp;<A HREF="../../../../com/google/common/collect/MapMaker.html" title="class in com.google.common.collect">MapMaker</A></CODE></FONT></TD>
191 <TD><CODE><B><A HREF="../../../../com/google/common/collect/MapMaker.html#concurrencyLevel(int)">concurrencyLevel</A></B>(int&nbsp;concurrencyLevel)</CODE>
198 <CODE>&nbsp;<A HREF="../../../../com/google/common/collect/MapMaker.html" title="class in com.google.common.collect">MapMaker</A></CODE></FONT></TD>
199 <TD><CODE><B><A HREF="../../../../com/google/common/collect/MapMaker.html#expiration(long, java.util.concurrent.TimeUnit)">expiration</A></B>(long&nbsp;duration,
200 <A HREF="http://java.sun.com/javase/6/docs/api/java/util/concurrent/TimeUnit.html?is-external=true" title="class or interface in java.util.concurrent">TimeUnit</A>&nbsp;unit)</CODE>
208 <CODE>&nbsp;<A HREF="../../../../com/google/common/collect/MapMaker.html" title="class in com.google.common.collect">MapMaker</A></CODE></FONT></TD>
209 <TD><CODE><B><A HREF="../../../../com/google/common/collect/MapMaker.html#initialCapacity(int)">initialCapacity</A></B>(int&nbsp;initialCapacity)</CODE>
216 <CODE>
220 <CODE>&lt;K,V&gt; <A HREF="http://java.sun.com/javase/6/docs/api/java/util/concurrent/ConcurrentMap.html?is-external=true" title="class or interface in java.util.concurrent">ConcurrentMap</A>&lt;K,V&gt;</CODE></FONT></TD>
223 </CODE></FONT></TD>
224 <TD><CODE><B><A HREF="../../../../com/google/common/collect/MapMaker.html#makeComputingMap(com.google.common.base.Function)">makeComputingMap</A></B>(<A HREF="../../../../com/google/common/base/Function.html" title="interface in com.google.common.base">Function</A>&lt;? super K,? extends V&gt;&nbsp;computingFunction)</CODE>
231 <CODE>
235 <CODE>&lt;K,V&gt; <A HREF="http://java.sun.com/javase/6/docs/api/java/util/concurrent/ConcurrentMap.html?is-external=true" title="class or interface in java.util.concurrent">ConcurrentMap</A>&lt;K,V&gt;</CODE></FONT></TD>
238 </CODE></FONT></TD>
239 <TD><CODE><B><A HREF="../../../../com/google/common/collect/MapMaker.html#makeMap()">makeMap</A></B>()</CODE>
246 <CODE>&nbsp;<A HREF="../../../../com/google/common/collect/MapMaker.html" title="class in com.google.common.collect">MapMaker</A></CODE></FONT></TD>
247 <TD><CODE><B><A HREF="../../../../com/google/common/collect/MapMaker.html#softKeys()">softKeys</A></B>()</CODE>
251 wrapped in a <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/ref/SoftReference.html?is-external=true" title="class or interface in java.lang.ref"><CODE>SoftReference</CODE></A> (by default, strong references
256 <CODE>&nbsp;<A HREF="../../../../com/google/common/collect/MapMaker.html" title="class in com.google.common.collect">MapMaker</A></CODE></FONT></TD>
257 <TD><CODE><B><A HREF="../../../../com/google/common/collect/MapMaker.html#softValues()">softValues</A></B>()</CODE>
261 wrapped in a <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/ref/SoftReference.html?is-external=true" title="class or interface in java.lang.ref"><CODE>SoftReference</CODE></A> (by default, strong references
266 <CODE>&nbsp;<A HREF="../../../../com/google/common/collect/MapMaker.html" title="class in com.google.common.collect">MapMaker</A></CODE></FONT></TD>
267 <TD><CODE><B><A HREF="../../../../com/google/common/collect/MapMaker.html#weakKeys()">weakKeys</A></B>()</CODE>
271 wrapped in a <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/ref/WeakReference.html?is-external=true" title="class or interface in java.lang.ref"><CODE>WeakReference</CODE></A> (by default, strong references
276 <CODE>&nbsp;<A HREF="../../../../com/google/common/collect/MapMaker.html" title="class in com.google.common.collect">MapMaker</A></CODE></FONT></TD>
277 <TD><CODE><B><A HREF="../../../../com/google/common/collect/MapMaker.html#weakValues()">weakValues</A></B>()</CODE>
281 wrapped in a <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/ref/WeakReference.html?is-external=true" title="class or interface in java.lang.ref"><CODE>WeakReference</CODE></A> (by default, strong references
291 <TD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
312 <DD>Constructs a new <code>MapMaker</code> instance with default settings,
340 <DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if <code>initialCapacity</code> is
342 <DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if an initial capacity was already set</DL>
368 <DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if <code>concurrencyLevel</code> is
370 <DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if a concurrency level was already set</DL>
381 wrapped in a <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/ref/WeakReference.html?is-external=true" title="class or interface in java.lang.ref"><CODE>WeakReference</CODE></A> (by default, strong references
384 <p><b>Note:</b> the map will use identity (<code>==</code>) comparison
387 using a different but <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang"><CODE>equals</CODE></A>-equivalent
393 <DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the key strength was already set<DT><B>See Also:</B><DD><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/ref/WeakReference.html?is-external=true" title="class or interface in java.lang.ref"><CODE>WeakReference</CODE></A></DL>
404 wrapped in a <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/ref/SoftReference.html?is-external=true" title="class or interface in java.lang.ref"><CODE>SoftReference</CODE></A> (by default, strong references
407 <p><b>Note:</b> the map will use identity (<code>==</code>) comparison
410 using a different but <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang"><CODE>equals</CODE></A>-equivalent
416 <DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the key strength was already set<DT><B>See Also:</B><DD><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/ref/SoftReference.html?is-external=true" title="class or interface in java.lang.ref"><CODE>SoftReference</CODE></A></DL>
427 wrapped in a <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/ref/WeakReference.html?is-external=true" title="class or interface in java.lang.ref"><CODE>WeakReference</CODE></A> (by default, strong references
432 <A HREF="../../../../com/google/common/collect/MapMaker.html#softValues()"><CODE>softValues()</CODE></A> instead.
434 <p><b>Note:</b> the map will use identity (<code>==</code>) comparison
436 the behavior of <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true#containsValue(java.lang.Object)" title="class or interface in java.util"><CODE>containsValue</CODE></A>,
437 <A HREF="http://java.sun.com/javase/6/docs/api/java/util/concurrent/ConcurrentMap.html?is-external=true#remove(java.lang.Object, java.lang.Object)" title="class or interface in java.util.concurrent"><CODE>remove(Object, Object)</CODE></A>,
438 and <A HREF="http://java.sun.com/javase/6/docs/api/java/util/concurrent/ConcurrentMap.html?is-external=true#replace(K, V, V)" title="class or interface in java.util.concurrent"><CODE>replace(K, V, V)</CODE></A>.
443 <DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the key strength was already set<DT><B>See Also:</B><DD><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/ref/WeakReference.html?is-external=true" title="class or interface in java.lang.ref"><CODE>WeakReference</CODE></A></DL>
454 wrapped in a <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/ref/SoftReference.html?is-external=true" title="class or interface in java.lang.ref"><CODE>SoftReference</CODE></A> (by default, strong references
461 <p><b>Note:</b> the map will use identity (<code>==</code>) comparison
463 the behavior of <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true#containsValue(java.lang.Object)" title="class or interface in java.util"><CODE>containsValue</CODE></A>,
464 <A HREF="http://java.sun.com/javase/6/docs/api/java/util/concurrent/ConcurrentMap.html?is-external=true#remove(java.lang.Object, java.lang.Object)" title="class or interface in java.util.concurrent"><CODE>remove(Object, Object)</CODE></A>,
465 and <A HREF="http://java.sun.com/javase/6/docs/api/java/util/concurrent/ConcurrentMap.html?is-external=true#replace(K, V, V)" title="class or interface in java.util.concurrent"><CODE>replace(K, V, V)</CODE></A>.
470 <DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the value strength was already set<DT><B>See Also:</B><DD><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/ref/SoftReference.html?is-external=true" title="class or interface in java.lang.ref"><CODE>SoftReference</CODE></A></DL>
485 <DT><B>Parameters:</B><DD><CODE>duration</CODE> - the length of time after an entry is created that it
486 should be automatically removed<DD><CODE>unit</CODE> - the unit that <code>duration</code> is expressed in
488 <DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if <code>duration</code> is not positive
489 <DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the expiration time was already set</DL>
500 does not alter the state of this <code>MapMaker</code> instance, so it can be
504 <DT><B>Type Parameters:</B><DD><CODE>K</CODE> - the type of keys to be stored in the returned map<DD><CODE>V</CODE> - the type of values to be stored in the returned map
515 <DD>Builds a map that supports atomic, on-demand computation of values. <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true#get(java.lang.Object)" title="class or interface in java.util"><CODE>Map.get(java.lang.Object)</CODE></A> either returns an already-computed value for the given key,
522 besides <code>get</code> return immediately as if an entry doesn't exist. In
526 <p><A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true#get(java.lang.Object)" title="class or interface in java.util"><CODE>Map.get(java.lang.Object)</CODE></A> on the returned map will never return <code>null</code>. It
530 <li><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang"><CODE>NullPointerException</CODE></A> if the key is null or the computing
532 <li><A HREF="../../../../com/google/common/collect/ComputationException.html" title="class in com.google.common.collect"><CODE>ComputationException</CODE
533 computing function. If that exception is already of type <A HREF="../../../../com/google/common/collect/ComputationException.html" title="class in com.google.common.collect"><CODE>ComputationException</CODE></A>, it is propagated directly; otherwise it is
537 <p><b>Note:</b> Callers of <code>get</code> <i>must</i> ensure that the key
538 argument is of type <code>K</code>. The <code>get</code> method accepts <code>Object</code>, so the key type is not checked at compile time. Passing an object
539 of a type other than <code>K</code> can result in that object being unsafely
540 passed to the computing function as type <code>K</code>, and unsafely stored in
543 <p>If <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true#put(K, V)" title="class or interface in java.util"><CODE>Map.put(K, V)</CODE></A> is called before a computation completes, other
548 <p>This method does not alter the state of this <code>MapMaker</code> instance,