当前位置: 首页>>代码示例>>Java>>正文


Java Maps.newLinkedHashMap方法代码示例

本文整理汇总了Java中com.beust.jcommander.internal.Maps.newLinkedHashMap方法的典型用法代码示例。如果您正苦于以下问题:Java Maps.newLinkedHashMap方法的具体用法?Java Maps.newLinkedHashMap怎么用?Java Maps.newLinkedHashMap使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.beust.jcommander.internal.Maps的用法示例。


在下文中一共展示了Maps.newLinkedHashMap方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: sort

import com.beust.jcommander.internal.Maps; //导入方法依赖的package包/类
@Override
public Map sort(Class type, Map keyedByFieldKey) {
    Annotation sequence = type.getAnnotation(XMLSequence.class);
    if (sequence != null) {
        final String[] fieldsOrder = ((XMLSequence) sequence).value();
        Map<Object, Object> result = Maps.newLinkedHashMap();
        Set<Map.Entry<FieldKey, Field>> fields = keyedByFieldKey.entrySet();
        for (String fieldName : fieldsOrder) {
            if (fieldName != null) {
                for (Map.Entry<FieldKey, Field> fieldEntry : fields) {
                    if (fieldName.equals(fieldEntry.getKey().getFieldName())) {
                        result.put(fieldEntry.getKey(), fieldEntry.getValue());
                    }
                }
            }
        }
        return result;
    } else {
        return keyedByFieldKey;
    }

}
 
开发者ID:GojaFramework,项目名称:goja,代码行数:23,代码来源:SequenceFieldKeySorter.java

示例2: getCommands

import com.beust.jcommander.internal.Maps; //导入方法依赖的package包/类
public Map<String, JCommander> getCommands() {
    Map<String, JCommander> res = Maps.newLinkedHashMap();
    for (Map.Entry<ProgramName, JCommander> entry : commands.entrySet()) {
        res.put(entry.getKey().name, entry.getValue());
    }
    return res;
}
 
开发者ID:georghinkel,项目名称:ttc2017smartGrids,代码行数:8,代码来源:JCommander.java

示例3: init

import com.beust.jcommander.internal.Maps; //导入方法依赖的package包/类
public void init(Module... modules) {
    if(modules == null) {
        modules = new Module[0];
    }
    this.metricModule = new JavaTestModule.MetricModule();
    injector = Guice.createInjector(Iterables.concat(ImmutableList.<Module>of(new CompilingTestModule()), Arrays.asList(modules)));
    source = injector.getInstance(ASMClassSource.class);
    scope = new GambitSource(source);
    this.modules = Maps.newLinkedHashMap();
    this.views = Maps.newHashMap();
    this.sources = Maps.newLinkedHashMap();
}
 
开发者ID:yahoo,项目名称:yql-plus,代码行数:13,代码来源:CompilingTestBase.java

示例4: getCommands

import com.beust.jcommander.internal.Maps; //导入方法依赖的package包/类
public Map<String, JCommander> getCommands() {
  Map<String, JCommander> res = Maps.newLinkedHashMap();
  for (Map.Entry<ProgramName, JCommander> entry : m_commands.entrySet()) {
    res.put(entry.getKey().m_name, entry.getValue());
  }
  return res;
}
 
开发者ID:jeffoffutt,项目名称:muJava,代码行数:8,代码来源:JCommander.java

示例5: getDescription

import com.beust.jcommander.internal.Maps; //导入方法依赖的package包/类
public static AnalysisEngineDescription getDescription() throws UIMAException, IOException {
    Map<String, MetaDataObject> aeDescriptions = Maps.newLinkedHashMap();
    aeDescriptions.put("tokenizer", TokenizerAPI.getAEImport());
    aeDescriptions.put("sentenceSplitter", SentenceSplitterAPI.getAEImport());
    Import posTaggerDescImport = new Import_impl();
    posTaggerDescImport.setName("com.textocat.textokit.postagger.postagger-ae");
    aeDescriptions.put("pos-tagger", posTaggerDescImport);
    //
    return PipelineDescriptorUtils.createAggregateDescription(
            ImmutableList.copyOf(aeDescriptions.values()),
            ImmutableList.copyOf(aeDescriptions.keySet()));
}
 
开发者ID:textocat,项目名称:textokit-core,代码行数:13,代码来源:GeneratePipelineDescriptorForOpenNLPPosTagger.java

示例6: getSonarProperties

import com.beust.jcommander.internal.Maps; //导入方法依赖的package包/类
/**
 * The String key/value pairs to be passed to the Sonar Runner.
 *
 * {@code null} values are not permitted.
 */
@Input
public Map<String, Object> getSonarProperties() {
    if (sonarProperties == null) {
        sonarProperties = Maps.newLinkedHashMap();
    }

    return sonarProperties;
}
 
开发者ID:Pushjet,项目名称:Pushjet-Android,代码行数:14,代码来源:SonarRunner.java

示例7: getCommands

import com.beust.jcommander.internal.Maps; //导入方法依赖的package包/类
public Map<String, JCommander> getCommands() {
    Map<String, JCommander> res = Maps.newLinkedHashMap();
    for (Map.Entry<ProgramName, JCommander> entry : m_commands.entrySet()) {
        res.put(entry.getKey().m_name, entry.getValue());
    }
    return res;
}
 
开发者ID:Corporatique-dev,项目名称:Corporatique,代码行数:8,代码来源:JCommander.java

示例8: deduplicateMedia

import com.beust.jcommander.internal.Maps; //导入方法依赖的package包/类
/**
 * Merges media records if the same image URL or link is given several times.
 * Remove any media that has not either a file or webpage uri.
 * @return a new list
 */
private static List<MediaObject> deduplicateMedia(List<MediaObject> mediaList) {
  Map<String, MediaObject> media = Maps.newLinkedHashMap();
  for (MediaObject m : mediaList) {

    URI uri = getPreferredURI(m);
    if (uri != null) {
      String url = uri.toString();
      if (!media.containsKey(url)) {
        media.put(url, m);
      }
    }
  }
  return Lists.newArrayList(media.values());
}
 
开发者ID:gbif,项目名称:occurrence,代码行数:20,代码来源:MultiMediaInterpreter.java


注:本文中的com.beust.jcommander.internal.Maps.newLinkedHashMap方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。