本文整理匯總了Java中com.google.common.collect.SetMultimap.putAll方法的典型用法代碼示例。如果您正苦於以下問題:Java SetMultimap.putAll方法的具體用法?Java SetMultimap.putAll怎麽用?Java SetMultimap.putAll使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.google.common.collect.SetMultimap
的用法示例。
在下文中一共展示了SetMultimap.putAll方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: identifyDuplicates
import com.google.common.collect.SetMultimap; //導入方法依賴的package包/類
private void identifyDuplicates(List<ModContainer> mods)
{
TreeMultimap<ModContainer, File> dupsearch = TreeMultimap.create(new ModIdComparator(), Ordering.arbitrary());
for (ModContainer mc : mods)
{
if (mc.getSource() != null)
{
dupsearch.put(mc, mc.getSource());
}
}
ImmutableMultiset<ModContainer> duplist = Multisets.copyHighestCountFirst(dupsearch.keys());
SetMultimap<ModContainer, File> dupes = LinkedHashMultimap.create();
for (Entry<ModContainer> e : duplist.entrySet())
{
if (e.getCount() > 1)
{
FMLLog.severe("Found a duplicate mod %s at %s", e.getElement().getModId(), dupsearch.get(e.getElement()));
dupes.putAll(e.getElement(),dupsearch.get(e.getElement()));
}
}
if (!dupes.isEmpty())
{
throw new DuplicateModsFoundException(dupes);
}
}
示例2: readDependencyConfigurationMapping
import com.google.common.collect.SetMultimap; //導入方法依賴的package包/類
private SetMultimap<String, String> readDependencyConfigurationMapping() throws IOException {
int size = readCount();
SetMultimap<String, String> result = LinkedHashMultimap.create();
for (int i = 0; i < size; i++) {
String from = readString();
Set<String> to = readStringSet();
result.putAll(from, to);
}
return result;
}
示例3: buildPluginNames
import com.google.common.collect.SetMultimap; //導入方法依賴的package包/類
private static void buildPluginNames(SetMultimap<String, Class<?>> info, Properties properties) {
for (String name : properties.stringPropertyNames()) {
List<Class<?>> classList = classList(name, properties.getProperty(name));
if (info.containsKey(name)) {
throw new GenerationException("duplicate name in plugins: " + name);
}
info.putAll(name, classList);
}
}
示例4: verzamelPersonenPerAutorisatie
import com.google.common.collect.SetMultimap; //導入方法依賴的package包/類
/**
* Verzamel per autorisatiebundel alle bijgehouden personen
* @param berichten lijst met BRP en LO3 berichten
*/
private SetMultimap<Autorisatiebundel, Persoonslijst> verzamelPersonenPerAutorisatie(final List<Mutatiebericht> berichten) {
final SetMultimap<Autorisatiebundel, Persoonslijst> bijgehoudenPersonen = LinkedHashMultimap.create();
for (final Mutatiebericht mutatiebericht : berichten) {
bijgehoudenPersonen.putAll(mutatiebericht.getMutatielevering().getAutorisatiebundel(), mutatiebericht.getPersonenInBericht());
}
return bijgehoudenPersonen;
}