Java Examples for com.google.common.collect.Maps.asMap
The following java examples will help you to understand the usage of com.google.common.collect.Maps.asMap. These source code samples are taken from different open source projects.
Example 1
Project: datakernel-master File: TestAggregatorSplitter.java View source code |
@Override protected void addOutputs() { pubAggregator = addOutput(AggregationItem.class, asMap(PUB_DIMENSIONS, Functions.<String>identity()), asMap(PUB_METRICS, Functions.<String>identity())); advAggregator = addOutput(AggregationItem.class, asMap(ADV_DIMENSIONS, Functions.<String>identity()), asMap(ADV_METRICS, Functions.<String>identity())); }
Example 2
Project: sonarqube-master File: LanguageDistributionMeasuresStep.java View source code |
@Override
public Optional<Measure> createMeasure(LanguageDistributionCounter counter, CreateMeasureContext context) {
if (counter.multiset.isEmpty()) {
return Optional.absent();
}
return Optional.of(newMeasureBuilder().create(format(asMap(counter.multiset.elementSet(), new LanguageToTotalCount(counter.multiset)))));
}