本文整理汇总了Java中com.google.common.collect.ImmutableMap.values方法的典型用法代码示例。如果您正苦于以下问题:Java ImmutableMap.values方法的具体用法?Java ImmutableMap.values怎么用?Java ImmutableMap.values使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.common.collect.ImmutableMap
的用法示例。
在下文中一共展示了ImmutableMap.values方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: isFieldMappingMissingField
import com.google.common.collect.ImmutableMap; //导入方法依赖的package包/类
/**
* Helper method to find out if the only included fieldmapping metadata is typed NULL, which means
* that type and index exist, but the field did not
*/
private boolean isFieldMappingMissingField(ImmutableMap<String, ImmutableMap<String, ImmutableMap<String, FieldMappingMetaData>>> mappingsByIndex) throws IOException {
if (mappingsByIndex.size() != 1) {
return false;
}
for (ImmutableMap<String, ImmutableMap<String, FieldMappingMetaData>> value : mappingsByIndex.values()) {
for (ImmutableMap<String, FieldMappingMetaData> fieldValue : value.values()) {
for (Map.Entry<String, FieldMappingMetaData> fieldMappingMetaDataEntry : fieldValue.entrySet()) {
if (fieldMappingMetaDataEntry.getValue().isNull()) {
return true;
}
}
}
}
return false;
}
示例2: writeBootstrappedOutput
import com.google.common.collect.ImmutableMap; //导入方法依赖的package包/类
private void writeBootstrappedOutput(final List<EALScorer2015Style.Result> perDocResults,
final File baseOutputDir) throws IOException {
if (doBootstrapping) {
// boostrapped result writers are stateful, so we need to get new ones each time
final ImmutableMap.Builder<String, BootstrappedResultWriter> builder = ImmutableMap.builder();
for (final Map.Entry<String, BootstrappedResultWriterSource> source : bootstrappedResultWriterSources
.entrySet()) {
builder.put(source.getKey(), source.getValue().getResultWriter());
}
final ImmutableMap<String, BootstrappedResultWriter> bootstrappedWriters = builder.build();
// this will produce an infinite sequence of bootstrapped samples of the corpus
final Iterator<Collection<EALScorer2015Style.Result>>
bootstrapIt = BootstrapIterator.forData(perDocResults, new Random(bootstrapSeed));
// a bootstrap iterator always has .next()
for (int i = 0; i < numBootstrapSamples; ++i) {
// be sure to use the same sample for all observers
final Collection<EALScorer2015Style.Result> sample = bootstrapIt.next();
for (final KBP2015Scorer.BootstrappedResultWriter bootstrappedResultWriter : bootstrappedWriters
.values()) {
bootstrappedResultWriter.observeSample(sample);
}
}
for (final Map.Entry<String, BootstrappedResultWriter> resultWriterEntry : bootstrappedWriters
.entrySet()) {
final File outputDir = new File(baseOutputDir, resultWriterEntry.getKey());
outputDir.mkdirs();
resultWriterEntry.getValue().writeResult(outputDir);
}
}
}
示例3: buildQuads
import com.google.common.collect.ImmutableMap; //导入方法依赖的package包/类
private static ImmutableList<BakedQuad> buildQuads(ImmutableMap<Optional<BlockRenderLayer>, IBakedModel> models, Optional<EnumFacing> side)
{
ImmutableList.Builder<BakedQuad> builder = ImmutableList.builder();
for(IBakedModel model : models.values())
{
builder.addAll(model.getQuads(null, side.orNull(), 0));
}
return builder.build();
}