| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!--NewPage--> |
| <HTML> |
| <HEAD> |
| <!-- Generated by javadoc (build 1.6.0-google-internal) on Wed Dec 09 09:28:16 PST 2009 --> |
| <TITLE> |
| Multimaps (Google Collections Library 1.0-rc5) |
| </TITLE> |
| |
| <META NAME="date" CONTENT="2009-12-09"> |
| |
| <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"> |
| |
| <SCRIPT type="text/javascript"> |
| function windowTitle() |
| { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="Multimaps (Google Collections Library 1.0-rc5)"; |
| } |
| } |
| </SCRIPT> |
| <NOSCRIPT> |
| </NOSCRIPT> |
| |
| </HEAD> |
| |
| <BODY BGCOLOR="white" onload="windowTitle();"> |
| <HR> |
| |
| |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <A NAME="navbar_top"><!-- --></A> |
| <A HREF="#skip-navbar_top" title="Skip navigation links"></A> |
| <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> |
| <TR> |
| <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
| <A NAME="navbar_top_firstrow"><!-- --></A> |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> |
| <TR ALIGN="center" VALIGN="top"> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
| <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Multimaps.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
| </TR> |
| </TABLE> |
| </TD> |
| <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
| </EM> |
| </TD> |
| </TR> |
| |
| <TR> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect"><B>PREV CLASS</B></A> |
| <A HREF="../../../../com/google/common/collect/Multiset.html" title="interface in com.google.common.collect"><B>NEXT CLASS</B></A></FONT></TD> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../index.html?com/google/common/collect/Multimaps.html" target="_top"><B>FRAMES</B></A> |
| <A HREF="Multimaps.html" target="_top"><B>NO FRAMES</B></A> |
| <SCRIPT type="text/javascript"> |
| <!-- |
| if(window==top) { |
| document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); |
| } |
| //--> |
| </SCRIPT> |
| <NOSCRIPT> |
| <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> |
| </NOSCRIPT> |
| |
| |
| </FONT></TD> |
| </TR> |
| <TR> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> |
| </TR> |
| </TABLE> |
| <A NAME="skip-navbar_top"></A> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| |
| <HR> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <H2> |
| <FONT SIZE="-1"> |
| com.google.common.collect</FONT> |
| <BR> |
| Class Multimaps</H2> |
| <PRE> |
| <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A> |
| <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>com.google.common.collect.Multimaps</B> |
| </PRE> |
| <HR> |
| <DL> |
| <DT><PRE>public final class <B>Multimaps</B><DT>extends <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></DL> |
| </PRE> |
| |
| <P> |
| Provides static methods acting on or generating a <code>Multimap</code>. |
| <P> |
| |
| <P> |
| <DL> |
| <DT><B>Author:</B></DT> |
| <DD>Jared Levy, Robert Konigsberg, Mike Bostock</DD> |
| </DL> |
| <HR> |
| |
| <P> |
| |
| <!-- ========== METHOD SUMMARY =========== --> |
| |
| <A NAME="method_summary"><!-- --></A> |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
| <B>Method Summary</B></FONT></TH> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> |
| <TR ALIGN="right" VALIGN=""> |
| <TD NOWRAP><FONT SIZE="-1"> |
| <CODE><K,V> <A HREF="../../../../com/google/common/collect/SetMultimap.html" title="interface in com.google.common.collect">SetMultimap</A><K,V></CODE></FONT></TD> |
| </TR> |
| </TABLE> |
| </CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../com/google/common/collect/Multimaps.html#forMap(java.util.Map)">forMap</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A><K,V> map)</CODE> |
| |
| <BR> |
| Returns a multimap view of the specified map.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> |
| <TR ALIGN="right" VALIGN=""> |
| <TD NOWRAP><FONT SIZE="-1"> |
| <CODE><K,V> <A HREF="../../../../com/google/common/collect/ImmutableListMultimap.html" title="class in com.google.common.collect">ImmutableListMultimap</A><K,V></CODE></FONT></TD> |
| </TR> |
| </TABLE> |
| </CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../com/google/common/collect/Multimaps.html#index(java.lang.Iterable, com.google.common.base.Function)">index</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</A><V> values, |
| <A HREF="../../../../com/google/common/base/Function.html" title="interface in com.google.common.base">Function</A><? super V,K> keyFunction)</CODE> |
| |
| <BR> |
| Creates an index <code>ImmutableMultimap</code> that contains the results of |
| applying a specified function to each item in an <code>Iterable</code> of |
| values.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> |
| <TR ALIGN="right" VALIGN=""> |
| <TD NOWRAP><FONT SIZE="-1"> |
| <CODE><K,V,M extends <A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect">Multimap</A><K,V>> |
| <BR> |
| M</CODE></FONT></TD> |
| </TR> |
| </TABLE> |
| </CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../com/google/common/collect/Multimaps.html#invertFrom(com.google.common.collect.Multimap, M)">invertFrom</A></B>(<A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect">Multimap</A><? extends V,? extends K> source, |
| M dest)</CODE> |
| |
| <BR> |
| Copies each key-value mapping in <code>source</code> into <code>dest</code>, with |
| its key and value reversed.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> |
| <TR ALIGN="right" VALIGN=""> |
| <TD NOWRAP><FONT SIZE="-1"> |
| <CODE><K,V> <A HREF="../../../../com/google/common/collect/ListMultimap.html" title="interface in com.google.common.collect">ListMultimap</A><K,V></CODE></FONT></TD> |
| </TR> |
| </TABLE> |
| </CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../com/google/common/collect/Multimaps.html#newListMultimap(java.util.Map, com.google.common.base.Supplier)">newListMultimap</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A><K,<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A><V>> map, |
| <A HREF="../../../../com/google/common/base/Supplier.html" title="interface in com.google.common.base">Supplier</A><? extends <A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A><V>> factory)</CODE> |
| |
| <BR> |
| Creates a new <code>ListMultimap</code> that uses the provided map and factory.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> |
| <TR ALIGN="right" VALIGN=""> |
| <TD NOWRAP><FONT SIZE="-1"> |
| <CODE><K,V> <A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect">Multimap</A><K,V></CODE></FONT></TD> |
| </TR> |
| </TABLE> |
| </CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../com/google/common/collect/Multimaps.html#newMultimap(java.util.Map, com.google.common.base.Supplier)">newMultimap</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A><K,<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A><V>> map, |
| <A HREF="../../../../com/google/common/base/Supplier.html" title="interface in com.google.common.base">Supplier</A><? extends <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A><V>> factory)</CODE> |
| |
| <BR> |
| Creates a new <code>Multimap</code> that uses the provided map and factory.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> |
| <TR ALIGN="right" VALIGN=""> |
| <TD NOWRAP><FONT SIZE="-1"> |
| <CODE><K,V> <A HREF="../../../../com/google/common/collect/SetMultimap.html" title="interface in com.google.common.collect">SetMultimap</A><K,V></CODE></FONT></TD> |
| </TR> |
| </TABLE> |
| </CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../com/google/common/collect/Multimaps.html#newSetMultimap(java.util.Map, com.google.common.base.Supplier)">newSetMultimap</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A><K,<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A><V>> map, |
| <A HREF="../../../../com/google/common/base/Supplier.html" title="interface in com.google.common.base">Supplier</A><? extends <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A><V>> factory)</CODE> |
| |
| <BR> |
| Creates a new <code>SetMultimap</code> that uses the provided map and factory.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> |
| <TR ALIGN="right" VALIGN=""> |
| <TD NOWRAP><FONT SIZE="-1"> |
| <CODE><K,V> <A HREF="../../../../com/google/common/collect/SortedSetMultimap.html" title="interface in com.google.common.collect">SortedSetMultimap</A><K,V></CODE></FONT></TD> |
| </TR> |
| </TABLE> |
| </CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../com/google/common/collect/Multimaps.html#newSortedSetMultimap(java.util.Map, com.google.common.base.Supplier)">newSortedSetMultimap</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A><K,<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A><V>> map, |
| <A HREF="../../../../com/google/common/base/Supplier.html" title="interface in com.google.common.base">Supplier</A><? extends <A HREF="http://java.sun.com/javase/6/docs/api/java/util/SortedSet.html?is-external=true" title="class or interface in java.util">SortedSet</A><V>> factory)</CODE> |
| |
| <BR> |
| Creates a new <code>SortedSetMultimap</code> that uses the provided map and |
| factory.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> |
| <TR ALIGN="right" VALIGN=""> |
| <TD NOWRAP><FONT SIZE="-1"> |
| <CODE><K,V> <A HREF="../../../../com/google/common/collect/ListMultimap.html" title="interface in com.google.common.collect">ListMultimap</A><K,V></CODE></FONT></TD> |
| </TR> |
| </TABLE> |
| </CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../com/google/common/collect/Multimaps.html#synchronizedListMultimap(com.google.common.collect.ListMultimap)">synchronizedListMultimap</A></B>(<A HREF="../../../../com/google/common/collect/ListMultimap.html" title="interface in com.google.common.collect">ListMultimap</A><K,V> multimap)</CODE> |
| |
| <BR> |
| Returns a synchronized (thread-safe) <code>ListMultimap</code> backed by the |
| specified multimap.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> |
| <TR ALIGN="right" VALIGN=""> |
| <TD NOWRAP><FONT SIZE="-1"> |
| <CODE><K,V> <A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect">Multimap</A><K,V></CODE></FONT></TD> |
| </TR> |
| </TABLE> |
| </CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../com/google/common/collect/Multimaps.html#synchronizedMultimap(com.google.common.collect.Multimap)">synchronizedMultimap</A></B>(<A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect">Multimap</A><K,V> multimap)</CODE> |
| |
| <BR> |
| Returns a synchronized (thread-safe) multimap backed by the specified |
| multimap.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> |
| <TR ALIGN="right" VALIGN=""> |
| <TD NOWRAP><FONT SIZE="-1"> |
| <CODE><K,V> <A HREF="../../../../com/google/common/collect/SetMultimap.html" title="interface in com.google.common.collect">SetMultimap</A><K,V></CODE></FONT></TD> |
| </TR> |
| </TABLE> |
| </CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../com/google/common/collect/Multimaps.html#synchronizedSetMultimap(com.google.common.collect.SetMultimap)">synchronizedSetMultimap</A></B>(<A HREF="../../../../com/google/common/collect/SetMultimap.html" title="interface in com.google.common.collect">SetMultimap</A><K,V> multimap)</CODE> |
| |
| <BR> |
| Returns a synchronized (thread-safe) <code>SetMultimap</code> backed by the |
| specified multimap.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> |
| <TR ALIGN="right" VALIGN=""> |
| <TD NOWRAP><FONT SIZE="-1"> |
| <CODE><K,V> <A HREF="../../../../com/google/common/collect/SortedSetMultimap.html" title="interface in com.google.common.collect">SortedSetMultimap</A><K,V></CODE></FONT></TD> |
| </TR> |
| </TABLE> |
| </CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../com/google/common/collect/Multimaps.html#synchronizedSortedSetMultimap(com.google.common.collect.SortedSetMultimap)">synchronizedSortedSetMultimap</A></B>(<A HREF="../../../../com/google/common/collect/SortedSetMultimap.html" title="interface in com.google.common.collect">SortedSetMultimap</A><K,V> multimap)</CODE> |
| |
| <BR> |
| Returns a synchronized (thread-safe) <code>SortedSetMultimap</code> backed by |
| the specified multimap.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> |
| <TR ALIGN="right" VALIGN=""> |
| <TD NOWRAP><FONT SIZE="-1"> |
| <CODE><K,V> <A HREF="../../../../com/google/common/collect/ListMultimap.html" title="interface in com.google.common.collect">ListMultimap</A><K,V></CODE></FONT></TD> |
| </TR> |
| </TABLE> |
| </CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../com/google/common/collect/Multimaps.html#unmodifiableListMultimap(com.google.common.collect.ListMultimap)">unmodifiableListMultimap</A></B>(<A HREF="../../../../com/google/common/collect/ListMultimap.html" title="interface in com.google.common.collect">ListMultimap</A><K,V> delegate)</CODE> |
| |
| <BR> |
| Returns an unmodifiable view of the specified <code>ListMultimap</code>.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> |
| <TR ALIGN="right" VALIGN=""> |
| <TD NOWRAP><FONT SIZE="-1"> |
| <CODE><K,V> <A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect">Multimap</A><K,V></CODE></FONT></TD> |
| </TR> |
| </TABLE> |
| </CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../com/google/common/collect/Multimaps.html#unmodifiableMultimap(com.google.common.collect.Multimap)">unmodifiableMultimap</A></B>(<A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect">Multimap</A><K,V> delegate)</CODE> |
| |
| <BR> |
| Returns an unmodifiable view of the specified multimap.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> |
| <TR ALIGN="right" VALIGN=""> |
| <TD NOWRAP><FONT SIZE="-1"> |
| <CODE><K,V> <A HREF="../../../../com/google/common/collect/SetMultimap.html" title="interface in com.google.common.collect">SetMultimap</A><K,V></CODE></FONT></TD> |
| </TR> |
| </TABLE> |
| </CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../com/google/common/collect/Multimaps.html#unmodifiableSetMultimap(com.google.common.collect.SetMultimap)">unmodifiableSetMultimap</A></B>(<A HREF="../../../../com/google/common/collect/SetMultimap.html" title="interface in com.google.common.collect">SetMultimap</A><K,V> delegate)</CODE> |
| |
| <BR> |
| Returns an unmodifiable view of the specified <code>SetMultimap</code>.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""> |
| <TR ALIGN="right" VALIGN=""> |
| <TD NOWRAP><FONT SIZE="-1"> |
| <CODE><K,V> <A HREF="../../../../com/google/common/collect/SortedSetMultimap.html" title="interface in com.google.common.collect">SortedSetMultimap</A><K,V></CODE></FONT></TD> |
| </TR> |
| </TABLE> |
| </CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../com/google/common/collect/Multimaps.html#unmodifiableSortedSetMultimap(com.google.common.collect.SortedSetMultimap)">unmodifiableSortedSetMultimap</A></B>(<A HREF="../../../../com/google/common/collect/SortedSetMultimap.html" title="interface in com.google.common.collect">SortedSetMultimap</A><K,V> delegate)</CODE> |
| |
| <BR> |
| Returns an unmodifiable view of the specified <code>SortedSetMultimap</code>.</TD> |
| </TR> |
| </TABLE> |
| <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> |
| <TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <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> |
| </TR> |
| </TABLE> |
| |
| <P> |
| |
| <!-- ============ METHOD DETAIL ========== --> |
| |
| <A NAME="method_detail"><!-- --></A> |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> |
| <B>Method Detail</B></FONT></TH> |
| </TR> |
| </TABLE> |
| |
| <A NAME="newMultimap(java.util.Map, com.google.common.base.Supplier)"><!-- --></A><H3> |
| newMultimap</H3> |
| <PRE> |
| public static <K,V> <A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect">Multimap</A><K,V> <B>newMultimap</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A><K,<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A><V>> map, |
| <A HREF="../../../../com/google/common/base/Supplier.html" title="interface in com.google.common.base">Supplier</A><? extends <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A><V>> factory)</PRE> |
| <DL> |
| <DD>Creates a new <code>Multimap</code> that uses the provided map and factory. It |
| can generate a multimap based on arbitrary <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util"><CODE>Map</CODE></A> and |
| <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util"><CODE>Collection</CODE></A> classes. |
| |
| <p>The <code>factory</code>-generated and <code>map</code> classes determine the |
| multimap iteration order. They also specify the behavior of the |
| <code>equals</code>, <code>hashCode</code>, and <code>toString</code> methods for the |
| multimap and its returned views. However, the multimap's <code>get</code> |
| method returns instances of a different class than <code>factory.get()</code> |
| does. |
| |
| <p>The multimap is serializable if <code>map</code>, <code>factory</code>, the |
| collections generated by <code>factory</code>, and the multimap contents are all |
| serializable. |
| |
| <p>The multimap is not threadsafe when any concurrent operations update the |
| multimap, even if <code>map</code> and the instances generated by |
| <code>factory</code> are. Concurrent read operations will work correctly. To |
| allow concurrent update operations, wrap the multimap with a call to |
| <A HREF="../../../../com/google/common/collect/Multimaps.html#synchronizedMultimap(com.google.common.collect.Multimap)"><CODE>synchronizedMultimap(com.google.common.collect.Multimap<K, V>)</CODE></A>. |
| |
| <p>Call this method only when the simpler methods |
| <A HREF="../../../../com/google/common/collect/ArrayListMultimap.html#create()"><CODE>ArrayListMultimap.create()</CODE></A>, <A HREF="../../../../com/google/common/collect/HashMultimap.html#create()"><CODE>HashMultimap.create()</CODE></A>, |
| <A HREF="../../../../com/google/common/collect/LinkedHashMultimap.html#create()"><CODE>LinkedHashMultimap.create()</CODE></A>, <A HREF="../../../../com/google/common/collect/LinkedListMultimap.html#create()"><CODE>LinkedListMultimap.create()</CODE></A>, |
| <A HREF="../../../../com/google/common/collect/TreeMultimap.html#create()"><CODE>TreeMultimap.create()</CODE></A>, and |
| <A HREF="../../../../com/google/common/collect/TreeMultimap.html#create(java.util.Comparator, java.util.Comparator)"><CODE>TreeMultimap.create(Comparator, Comparator)</CODE></A> won't suffice. |
| |
| <p>Note: the multimap assumes complete ownership over of <code>map</code> and |
| the collections returned by <code>factory</code>. Those objects should not be |
| manually updated and they should not use soft, weak, or phantom references. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>map</CODE> - place to store the mapping from each key to its corresponding |
| values<DD><CODE>factory</CODE> - supplier of new, empty collections that will each hold all |
| values for a given key |
| <DT><B>Throws:</B> |
| <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>map</code> is not empty</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="newListMultimap(java.util.Map, com.google.common.base.Supplier)"><!-- --></A><H3> |
| newListMultimap</H3> |
| <PRE> |
| public static <K,V> <A HREF="../../../../com/google/common/collect/ListMultimap.html" title="interface in com.google.common.collect">ListMultimap</A><K,V> <B>newListMultimap</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A><K,<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A><V>> map, |
| <A HREF="../../../../com/google/common/base/Supplier.html" title="interface in com.google.common.base">Supplier</A><? extends <A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A><V>> factory)</PRE> |
| <DL> |
| <DD>Creates a new <code>ListMultimap</code> that uses the provided map and factory. |
| It can generate a multimap based on arbitrary <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util"><CODE>Map</CODE></A> and <A HREF="http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util"><CODE>List</CODE></A> |
| classes. |
| |
| <p>The <code>factory</code>-generated and <code>map</code> classes determine the |
| multimap iteration order. They also specify the behavior of the |
| <code>equals</code>, <code>hashCode</code>, and <code>toString</code> methods for the |
| multimap and its returned views. The multimap's <code>get</code>, <code>removeAll</code>, and <code>replaceValues</code> methods return <code>RandomAccess</code> |
| lists if the factory does. However, the multimap's <code>get</code> method |
| returns instances of a different class than does <code>factory.get()</code>. |
| |
| <p>The multimap is serializable if <code>map</code>, <code>factory</code>, the |
| lists generated by <code>factory</code>, and the multimap contents are all |
| serializable. |
| |
| <p>The multimap is not threadsafe when any concurrent operations update the |
| multimap, even if <code>map</code> and the instances generated by |
| <code>factory</code> are. Concurrent read operations will work correctly. To |
| allow concurrent update operations, wrap the multimap with a call to |
| <A HREF="../../../../com/google/common/collect/Multimaps.html#synchronizedListMultimap(com.google.common.collect.ListMultimap)"><CODE>synchronizedListMultimap(com.google.common.collect.ListMultimap<K, V>)</CODE></A>. |
| |
| <p>Call this method only when the simpler methods |
| <A HREF="../../../../com/google/common/collect/ArrayListMultimap.html#create()"><CODE>ArrayListMultimap.create()</CODE></A> and <A HREF="../../../../com/google/common/collect/LinkedListMultimap.html#create()"><CODE>LinkedListMultimap.create()</CODE></A> |
| won't suffice. |
| |
| <p>Note: the multimap assumes complete ownership over of <code>map</code> and |
| the lists returned by <code>factory</code>. Those objects should not be manually |
| updated and they should not use soft, weak, or phantom references. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>map</CODE> - place to store the mapping from each key to its corresponding |
| values<DD><CODE>factory</CODE> - supplier of new, empty lists that will each hold all values |
| for a given key |
| <DT><B>Throws:</B> |
| <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>map</code> is not empty</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="newSetMultimap(java.util.Map, com.google.common.base.Supplier)"><!-- --></A><H3> |
| newSetMultimap</H3> |
| <PRE> |
| public static <K,V> <A HREF="../../../../com/google/common/collect/SetMultimap.html" title="interface in com.google.common.collect">SetMultimap</A><K,V> <B>newSetMultimap</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A><K,<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A><V>> map, |
| <A HREF="../../../../com/google/common/base/Supplier.html" title="interface in com.google.common.base">Supplier</A><? extends <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</A><V>> factory)</PRE> |
| <DL> |
| <DD>Creates a new <code>SetMultimap</code> that uses the provided map and factory. |
| It can generate a multimap based on arbitrary <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util"><CODE>Map</CODE></A> and <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util"><CODE>Set</CODE></A> |
| classes. |
| |
| <p>The <code>factory</code>-generated and <code>map</code> classes determine the |
| multimap iteration order. They also specify the behavior of the |
| <code>equals</code>, <code>hashCode</code>, and <code>toString</code> methods for the |
| multimap and its returned views. However, the multimap's <code>get</code> |
| method returns instances of a different class than <code>factory.get()</code> |
| does. |
| |
| <p>The multimap is serializable if <code>map</code>, <code>factory</code>, the |
| sets generated by <code>factory</code>, and the multimap contents are all |
| serializable. |
| |
| <p>The multimap is not threadsafe when any concurrent operations update the |
| multimap, even if <code>map</code> and the instances generated by |
| <code>factory</code> are. Concurrent read operations will work correctly. To |
| allow concurrent update operations, wrap the multimap with a call to |
| <A HREF="../../../../com/google/common/collect/Multimaps.html#synchronizedSetMultimap(com.google.common.collect.SetMultimap)"><CODE>synchronizedSetMultimap(com.google.common.collect.SetMultimap<K, V>)</CODE></A>. |
| |
| <p>Call this method only when the simpler methods |
| <A HREF="../../../../com/google/common/collect/HashMultimap.html#create()"><CODE>HashMultimap.create()</CODE></A>, <A HREF="../../../../com/google/common/collect/LinkedHashMultimap.html#create()"><CODE>LinkedHashMultimap.create()</CODE></A>, |
| <A HREF="../../../../com/google/common/collect/TreeMultimap.html#create()"><CODE>TreeMultimap.create()</CODE></A>, and |
| <A HREF="../../../../com/google/common/collect/TreeMultimap.html#create(java.util.Comparator, java.util.Comparator)"><CODE>TreeMultimap.create(Comparator, Comparator)</CODE></A> won't suffice. |
| |
| <p>Note: the multimap assumes complete ownership over of <code>map</code> and |
| the sets returned by <code>factory</code>. Those objects should not be manually |
| updated and they should not use soft, weak, or phantom references. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>map</CODE> - place to store the mapping from each key to its corresponding |
| values<DD><CODE>factory</CODE> - supplier of new, empty sets that will each hold all values |
| for a given key |
| <DT><B>Throws:</B> |
| <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>map</code> is not empty</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="newSortedSetMultimap(java.util.Map, com.google.common.base.Supplier)"><!-- --></A><H3> |
| newSortedSetMultimap</H3> |
| <PRE> |
| public static <K,V> <A HREF="../../../../com/google/common/collect/SortedSetMultimap.html" title="interface in com.google.common.collect">SortedSetMultimap</A><K,V> <B>newSortedSetMultimap</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A><K,<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</A><V>> map, |
| <A HREF="../../../../com/google/common/base/Supplier.html" title="interface in com.google.common.base">Supplier</A><? extends <A HREF="http://java.sun.com/javase/6/docs/api/java/util/SortedSet.html?is-external=true" title="class or interface in java.util">SortedSet</A><V>> factory)</PRE> |
| <DL> |
| <DD>Creates a new <code>SortedSetMultimap</code> that uses the provided map and |
| factory. It can generate a multimap based on arbitrary <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util"><CODE>Map</CODE></A> and |
| <A HREF="http://java.sun.com/javase/6/docs/api/java/util/SortedSet.html?is-external=true" title="class or interface in java.util"><CODE>SortedSet</CODE></A> classes. |
| |
| <p>The <code>factory</code>-generated and <code>map</code> classes determine the |
| multimap iteration order. They also specify the behavior of the |
| <code>equals</code>, <code>hashCode</code>, and <code>toString</code> methods for the |
| multimap and its returned views. However, the multimap's <code>get</code> |
| method returns instances of a different class than <code>factory.get()</code> |
| does. |
| |
| <p>The multimap is serializable if <code>map</code>, <code>factory</code>, the |
| sets generated by <code>factory</code>, and the multimap contents are all |
| serializable. |
| |
| <p>The multimap is not threadsafe when any concurrent operations update the |
| multimap, even if <code>map</code> and the instances generated by |
| <code>factory</code> are. Concurrent read operations will work correctly. To |
| allow concurrent update operations, wrap the multimap with a call to |
| <A HREF="../../../../com/google/common/collect/Multimaps.html#synchronizedSortedSetMultimap(com.google.common.collect.SortedSetMultimap)"><CODE>synchronizedSortedSetMultimap(com.google.common.collect.SortedSetMultimap<K, V>)</CODE></A>. |
| |
| <p>Call this method only when the simpler methods |
| <A HREF="../../../../com/google/common/collect/TreeMultimap.html#create()"><CODE>TreeMultimap.create()</CODE></A> and |
| <A HREF="../../../../com/google/common/collect/TreeMultimap.html#create(java.util.Comparator, java.util.Comparator)"><CODE>TreeMultimap.create(Comparator, Comparator)</CODE></A> won't suffice. |
| |
| <p>Note: the multimap assumes complete ownership over of <code>map</code> and |
| the sets returned by <code>factory</code>. Those objects should not be manually |
| updated and they should not use soft, weak, or phantom references. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>map</CODE> - place to store the mapping from each key to its corresponding |
| values<DD><CODE>factory</CODE> - supplier of new, empty sorted sets that will each hold |
| all values for a given key |
| <DT><B>Throws:</B> |
| <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>map</code> is not empty</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="invertFrom(com.google.common.collect.Multimap,com.google.common.collect.Multimap)"><!-- --></A><A NAME="invertFrom(com.google.common.collect.Multimap, M)"><!-- --></A><H3> |
| invertFrom</H3> |
| <PRE> |
| public static <K,V,M extends <A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect">Multimap</A><K,V>> M <B>invertFrom</B>(<A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect">Multimap</A><? extends V,? extends K> source, |
| M dest)</PRE> |
| <DL> |
| <DD>Copies each key-value mapping in <code>source</code> into <code>dest</code>, with |
| its key and value reversed. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>source</CODE> - any multimap<DD><CODE>dest</CODE> - the multimap to copy into; usually empty |
| <DT><B>Returns:</B><DD><code>dest</code></DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="synchronizedMultimap(com.google.common.collect.Multimap)"><!-- --></A><H3> |
| synchronizedMultimap</H3> |
| <PRE> |
| public static <K,V> <A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect">Multimap</A><K,V> <B>synchronizedMultimap</B>(<A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect">Multimap</A><K,V> multimap)</PRE> |
| <DL> |
| <DD>Returns a synchronized (thread-safe) multimap backed by the specified |
| multimap. In order to guarantee serial access, it is critical that |
| <b>all</b> access to the backing multimap is accomplished through the |
| returned multimap. |
| |
| <p>It is imperative that the user manually synchronize on the returned |
| multimap when accessing any of its collection views: <pre> <code>Multimap<K, V> m = Multimaps.synchronizedMultimap( |
| HashMultimap.<K, V>create()); |
| ... |
| Set<K> s = m.keySet(); // Needn't be in synchronized block |
| ... |
| synchronized (m) { // Synchronizing on m, not s! |
| Iterator<K> i = s.iterator(); // Must be in synchronized block |
| while (i.hasNext()) { |
| foo(i.next()); |
| } |
| }</code></pre> |
| |
| Failure to follow this advice may result in non-deterministic behavior. |
| |
| <p>Note that the generated multimap's <A HREF="../../../../com/google/common/collect/Multimap.html#removeAll(java.lang.Object)"><CODE>Multimap.removeAll(java.lang.Object)</CODE></A> and |
| <A HREF="../../../../com/google/common/collect/Multimap.html#replaceValues(K, java.lang.Iterable)"><CODE>Multimap.replaceValues(K, java.lang.Iterable<? extends V>)</CODE></A> methods return collections that aren't |
| synchronized. |
| |
| <p>The returned multimap will be serializable if the specified multimap is |
| serializable. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>multimap</CODE> - the multimap to be wrapped in a synchronized view |
| <DT><B>Returns:</B><DD>a synchronized view of the specified multimap</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="unmodifiableMultimap(com.google.common.collect.Multimap)"><!-- --></A><H3> |
| unmodifiableMultimap</H3> |
| <PRE> |
| public static <K,V> <A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect">Multimap</A><K,V> <B>unmodifiableMultimap</B>(<A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect">Multimap</A><K,V> delegate)</PRE> |
| <DL> |
| <DD>Returns an unmodifiable view of the specified multimap. Query operations on |
| the returned multimap "read through" to the specified multimap, and |
| attempts to modify the returned multimap, either directly or through the |
| multimap's views, result in an <code>UnsupportedOperationException</code>. |
| |
| <p>Note that the generated multimap's <A HREF="../../../../com/google/common/collect/Multimap.html#removeAll(java.lang.Object)"><CODE>Multimap.removeAll(java.lang.Object)</CODE></A> and |
| <A HREF="../../../../com/google/common/collect/Multimap.html#replaceValues(K, java.lang.Iterable)"><CODE>Multimap.replaceValues(K, java.lang.Iterable<? extends V>)</CODE></A> methods return collections that are |
| modifiable. |
| |
| <p>The returned multimap will be serializable if the specified multimap is |
| serializable. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>delegate</CODE> - the multimap for which an unmodifiable view is to be |
| returned |
| <DT><B>Returns:</B><DD>an unmodifiable view of the specified multimap</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="synchronizedSetMultimap(com.google.common.collect.SetMultimap)"><!-- --></A><H3> |
| synchronizedSetMultimap</H3> |
| <PRE> |
| public static <K,V> <A HREF="../../../../com/google/common/collect/SetMultimap.html" title="interface in com.google.common.collect">SetMultimap</A><K,V> <B>synchronizedSetMultimap</B>(<A HREF="../../../../com/google/common/collect/SetMultimap.html" title="interface in com.google.common.collect">SetMultimap</A><K,V> multimap)</PRE> |
| <DL> |
| <DD>Returns a synchronized (thread-safe) <code>SetMultimap</code> backed by the |
| specified multimap. |
| |
| <p>You must follow the warnings described in <A HREF="../../../../com/google/common/collect/Multimaps.html#synchronizedMultimap(com.google.common.collect.Multimap)"><CODE>synchronizedMultimap(com.google.common.collect.Multimap<K, V>)</CODE></A>. |
| |
| <p>The returned multimap will be serializable if the specified multimap is |
| serializable. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>multimap</CODE> - the multimap to be wrapped |
| <DT><B>Returns:</B><DD>a synchronized view of the specified multimap</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="unmodifiableSetMultimap(com.google.common.collect.SetMultimap)"><!-- --></A><H3> |
| unmodifiableSetMultimap</H3> |
| <PRE> |
| public static <K,V> <A HREF="../../../../com/google/common/collect/SetMultimap.html" title="interface in com.google.common.collect">SetMultimap</A><K,V> <B>unmodifiableSetMultimap</B>(<A HREF="../../../../com/google/common/collect/SetMultimap.html" title="interface in com.google.common.collect">SetMultimap</A><K,V> delegate)</PRE> |
| <DL> |
| <DD>Returns an unmodifiable view of the specified <code>SetMultimap</code>. Query |
| operations on the returned multimap "read through" to the specified |
| multimap, and attempts to modify the returned multimap, either directly or |
| through the multimap's views, result in an |
| <code>UnsupportedOperationException</code>. |
| |
| <p>Note that the generated multimap's <A HREF="../../../../com/google/common/collect/Multimap.html#removeAll(java.lang.Object)"><CODE>Multimap.removeAll(java.lang.Object)</CODE></A> and |
| <A HREF="../../../../com/google/common/collect/Multimap.html#replaceValues(K, java.lang.Iterable)"><CODE>Multimap.replaceValues(K, java.lang.Iterable<? extends V>)</CODE></A> methods return collections that are |
| modifiable. |
| |
| <p>The returned multimap will be serializable if the specified multimap is |
| serializable. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>delegate</CODE> - the multimap for which an unmodifiable view is to be |
| returned |
| <DT><B>Returns:</B><DD>an unmodifiable view of the specified multimap</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="synchronizedSortedSetMultimap(com.google.common.collect.SortedSetMultimap)"><!-- --></A><H3> |
| synchronizedSortedSetMultimap</H3> |
| <PRE> |
| public static <K,V> <A HREF="../../../../com/google/common/collect/SortedSetMultimap.html" title="interface in com.google.common.collect">SortedSetMultimap</A><K,V> <B>synchronizedSortedSetMultimap</B>(<A HREF="../../../../com/google/common/collect/SortedSetMultimap.html" title="interface in com.google.common.collect">SortedSetMultimap</A><K,V> multimap)</PRE> |
| <DL> |
| <DD>Returns a synchronized (thread-safe) <code>SortedSetMultimap</code> backed by |
| the specified multimap. |
| |
| <p>You must follow the warnings described in <A HREF="../../../../com/google/common/collect/Multimaps.html#synchronizedMultimap(com.google.common.collect.Multimap)"><CODE>synchronizedMultimap(com.google.common.collect.Multimap<K, V>)</CODE></A>. |
| |
| <p>The returned multimap will be serializable if the specified multimap is |
| serializable. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>multimap</CODE> - the multimap to be wrapped |
| <DT><B>Returns:</B><DD>a synchronized view of the specified multimap</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="unmodifiableSortedSetMultimap(com.google.common.collect.SortedSetMultimap)"><!-- --></A><H3> |
| unmodifiableSortedSetMultimap</H3> |
| <PRE> |
| public static <K,V> <A HREF="../../../../com/google/common/collect/SortedSetMultimap.html" title="interface in com.google.common.collect">SortedSetMultimap</A><K,V> <B>unmodifiableSortedSetMultimap</B>(<A HREF="../../../../com/google/common/collect/SortedSetMultimap.html" title="interface in com.google.common.collect">SortedSetMultimap</A><K,V> delegate)</PRE> |
| <DL> |
| <DD>Returns an unmodifiable view of the specified <code>SortedSetMultimap</code>. |
| Query operations on the returned multimap "read through" to the specified |
| multimap, and attempts to modify the returned multimap, either directly or |
| through the multimap's views, result in an |
| <code>UnsupportedOperationException</code>. |
| |
| <p>Note that the generated multimap's <A HREF="../../../../com/google/common/collect/Multimap.html#removeAll(java.lang.Object)"><CODE>Multimap.removeAll(java.lang.Object)</CODE></A> and |
| <A HREF="../../../../com/google/common/collect/Multimap.html#replaceValues(K, java.lang.Iterable)"><CODE>Multimap.replaceValues(K, java.lang.Iterable<? extends V>)</CODE></A> methods return collections that are |
| modifiable. |
| |
| <p>The returned multimap will be serializable if the specified multimap is |
| serializable. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>delegate</CODE> - the multimap for which an unmodifiable view is to be |
| returned |
| <DT><B>Returns:</B><DD>an unmodifiable view of the specified multimap</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="synchronizedListMultimap(com.google.common.collect.ListMultimap)"><!-- --></A><H3> |
| synchronizedListMultimap</H3> |
| <PRE> |
| public static <K,V> <A HREF="../../../../com/google/common/collect/ListMultimap.html" title="interface in com.google.common.collect">ListMultimap</A><K,V> <B>synchronizedListMultimap</B>(<A HREF="../../../../com/google/common/collect/ListMultimap.html" title="interface in com.google.common.collect">ListMultimap</A><K,V> multimap)</PRE> |
| <DL> |
| <DD>Returns a synchronized (thread-safe) <code>ListMultimap</code> backed by the |
| specified multimap. |
| |
| <p>You must follow the warnings described in <A HREF="../../../../com/google/common/collect/Multimaps.html#synchronizedMultimap(com.google.common.collect.Multimap)"><CODE>synchronizedMultimap(com.google.common.collect.Multimap<K, V>)</CODE></A>. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>multimap</CODE> - the multimap to be wrapped |
| <DT><B>Returns:</B><DD>a synchronized view of the specified multimap</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="unmodifiableListMultimap(com.google.common.collect.ListMultimap)"><!-- --></A><H3> |
| unmodifiableListMultimap</H3> |
| <PRE> |
| public static <K,V> <A HREF="../../../../com/google/common/collect/ListMultimap.html" title="interface in com.google.common.collect">ListMultimap</A><K,V> <B>unmodifiableListMultimap</B>(<A HREF="../../../../com/google/common/collect/ListMultimap.html" title="interface in com.google.common.collect">ListMultimap</A><K,V> delegate)</PRE> |
| <DL> |
| <DD>Returns an unmodifiable view of the specified <code>ListMultimap</code>. Query |
| operations on the returned multimap "read through" to the specified |
| multimap, and attempts to modify the returned multimap, either directly or |
| through the multimap's views, result in an |
| <code>UnsupportedOperationException</code>. |
| |
| <p>Note that the generated multimap's <A HREF="../../../../com/google/common/collect/Multimap.html#removeAll(java.lang.Object)"><CODE>Multimap.removeAll(java.lang.Object)</CODE></A> and |
| <A HREF="../../../../com/google/common/collect/Multimap.html#replaceValues(K, java.lang.Iterable)"><CODE>Multimap.replaceValues(K, java.lang.Iterable<? extends V>)</CODE></A> methods return collections that are |
| modifiable. |
| |
| <p>The returned multimap will be serializable if the specified multimap is |
| serializable. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>delegate</CODE> - the multimap for which an unmodifiable view is to be |
| returned |
| <DT><B>Returns:</B><DD>an unmodifiable view of the specified multimap</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="forMap(java.util.Map)"><!-- --></A><H3> |
| forMap</H3> |
| <PRE> |
| public static <K,V> <A HREF="../../../../com/google/common/collect/SetMultimap.html" title="interface in com.google.common.collect">SetMultimap</A><K,V> <B>forMap</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A><K,V> map)</PRE> |
| <DL> |
| <DD>Returns a multimap view of the specified map. The multimap is backed by the |
| map, so changes to the map are reflected in the multimap, and vice versa. |
| If the map is modified while an iteration over one of the multimap's |
| collection views is in progress (except through the iterator's own <code>remove</code> operation, or through the <code>setValue</code> operation on a map entry |
| returned by the iterator), the results of the iteration are undefined. |
| |
| <p>The multimap supports mapping removal, which removes the corresponding |
| mapping from the map. It does not support any operations which might add |
| mappings, such as <code>put</code>, <code>putAll</code> or <code>replaceValues</code>. |
| |
| <p>The returned multimap will be serializable if the specified map is |
| serializable. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>map</CODE> - the backing map for the returned multimap view</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="index(java.lang.Iterable, com.google.common.base.Function)"><!-- --></A><H3> |
| index</H3> |
| <PRE> |
| public static <K,V> <A HREF="../../../../com/google/common/collect/ImmutableListMultimap.html" title="class in com.google.common.collect">ImmutableListMultimap</A><K,V> <B>index</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</A><V> values, |
| <A HREF="../../../../com/google/common/base/Function.html" title="interface in com.google.common.base">Function</A><? super V,K> keyFunction)</PRE> |
| <DL> |
| <DD>Creates an index <code>ImmutableMultimap</code> that contains the results of |
| applying a specified function to each item in an <code>Iterable</code> of |
| values. Each value will be stored as a value in the resulting multimap, |
| yielding a multimap with the same size as the input iterable. The key used |
| to store that value in the multimap will be the result of calling the |
| function on that value. The resulting multimap is created as an immutable |
| snapshot, it does <em>not</em> reflect subsequent changes on the input |
| iterable. |
| |
| <p>For example, <pre class="code"> <code>List<String> badGuys |
| = Arrays.asList("Inky", "Blinky", "Pinky", "Pinky", "Clyde"); |
| Function<String, Integer> stringLengthFunction = ...; |
| Multimap<Integer, String> index |
| = Multimaps.index(badGuys, stringLengthFunction); |
| System.out.println(index);</code></pre> |
| |
| prints <pre class="code"> <code>{4=[Inky], 5=[Pinky, Pinky, Clyde], 6=[Blinky]}</code></pre> |
| |
| <p>The returned multimap is serializable if its keys and values are all |
| serializable. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>values</CODE> - the values to use when constructing the <code>ImmutableMultimap</code><DD><CODE>keyFunction</CODE> - the function used to produce the key for each value |
| <DT><B>Returns:</B><DD><code>ImmutableMultimap</code> mapping the result of evaluating the |
| function <code>keyFunction</code> on each value in the input collection to |
| that value |
| <DT><B>Throws:</B> |
| <DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</A></CODE> - if any of the following cases is true: <ul> |
| <li> <code>values</code> is null |
| <li> <code>keyFunction</code> is null |
| <li> An element in <code>values</code> is null |
| <li> <code>keyFunction</code> returns null for any element of <code>values</code> |
| </ul></DL> |
| </DD> |
| </DL> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <HR> |
| |
| |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <A NAME="navbar_bottom"><!-- --></A> |
| <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> |
| <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> |
| <TR> |
| <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
| <A NAME="navbar_bottom_firstrow"><!-- --></A> |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> |
| <TR ALIGN="center" VALIGN="top"> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
| <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Multimaps.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
| </TR> |
| </TABLE> |
| </TD> |
| <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
| </EM> |
| </TD> |
| </TR> |
| |
| <TR> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../com/google/common/collect/Multimap.html" title="interface in com.google.common.collect"><B>PREV CLASS</B></A> |
| <A HREF="../../../../com/google/common/collect/Multiset.html" title="interface in com.google.common.collect"><B>NEXT CLASS</B></A></FONT></TD> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../index.html?com/google/common/collect/Multimaps.html" target="_top"><B>FRAMES</B></A> |
| <A HREF="Multimaps.html" target="_top"><B>NO FRAMES</B></A> |
| <SCRIPT type="text/javascript"> |
| <!-- |
| if(window==top) { |
| document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); |
| } |
| //--> |
| </SCRIPT> |
| <NOSCRIPT> |
| <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> |
| </NOSCRIPT> |
| |
| |
| </FONT></TD> |
| </TR> |
| <TR> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> |
| </TR> |
| </TABLE> |
| <A NAME="skip-navbar_bottom"></A> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| |
| <HR> |
| |
| </BODY> |
| </HTML> |