List of usage examples for com.google.common.collect ClassToInstanceMap putAll
void putAll(Map<? extends K, ? extends V> m);
From source file:com.opengamma.strata.basics.market.ImmutableTypedReferenceData.java
@Override public TypedReferenceData combinedWith(TypedReferenceData other) { ClassToInstanceMap<Object> combined = MutableClassToInstanceMap.create(); combined.putAll(values); for (Class<?> type : other.types()) { combined.merge(type, other.getValue(type), (v1, v2) -> { if (v1.equals(v2)) { return v1; }//from ww w . jav a2s . c o m throw new IllegalArgumentException(Messages.format( "Unable to combine reference data, values differ for type '{}'", type.getSimpleName())); }); } return ImmutableTypedReferenceData.of(combined); }