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


Java MultiValueMap.decorate方法代码示例

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


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

示例1: getSourcePlateTypesForEachAssayPlate

import org.apache.commons.collections.map.MultiValueMap; //导入方法依赖的package包/类
private MultiMap getSourcePlateTypesForEachAssayPlate(CherryPickRequest cherryPickRequest)
{
  MultiMap assayPlateName2PlateTypes = MultiValueMap.decorate(new HashMap(),
                                                           new Factory()
  {
    public Object create() { return new HashSet(); }
  });

  for (LabCherryPick cherryPick : cherryPickRequest.getLabCherryPicks()) {
    if (cherryPick.isAllocated() && cherryPick.isMapped()) {
      assayPlateName2PlateTypes.put(cherryPick.getAssayPlate().getName(),
                                    cherryPick.getSourceCopy().findPlate(cherryPick.getSourceWell().getPlateNumber()).getPlateType());
    }
  }
  return assayPlateName2PlateTypes;
}
 
开发者ID:hmsiccbl,项目名称:screensaver,代码行数:17,代码来源:CherryPickRequestPlateMapFilesBuilder.java

示例2: BaseController

import org.apache.commons.collections.map.MultiValueMap; //导入方法依赖的package包/类
public <T> BaseController() {
	listeners = MultiValueMap.decorate(new HashMap<String,ViewEventCallback<T>>());
}
 
开发者ID:vibridi,项目名称:fxutils,代码行数:4,代码来源:BaseController.java

示例3: buildCherryPickFiles

import org.apache.commons.collections.map.MultiValueMap; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
/**
 * Normally, we create 1 file per assay plate. However, in the case where an
 * assay plate is comprised of wells from library copy plates that have
 * different plate types, we need to generate a separate file for each source
 * plate type (i.e., the assay plate will be defined over multiple files).
 * @return a MultiMap that partitions the cherry picks by file,
 * ordering both the file names and cherry picks for each file.
 */
private MultiMap/*<String,SortedSet<CherryPick>>*/ buildCherryPickFiles(CherryPickRequest cherryPickRequest,
                                                                        Set<CherryPickAssayPlate> forPlates)
{
  MultiMap assayPlate2SourcePlateTypes = getSourcePlateTypesForEachAssayPlate(cherryPickRequest);

  MultiMap result = MultiValueMap.decorate(new TreeMap<String,SortedSet<LabCherryPick>>(),
                                           new Factory()
  {
    public Object create() { return new TreeSet<LabCherryPick>(PlateMappingCherryPickComparator.getInstance()); }
  });

  // HACK: transform set of CPAP into a set of IDs, for purpose of checking
  // set membership; we can't rely upon CPAP.equals(), since we're comparing
  // non-managed entities with managed entities, and therefore we do not have
  // the guarantee of instance equality for entities with the same ID
  Set<Serializable> forPlateIds = new HashSet<Serializable>( forPlates .size());
  for (CherryPickAssayPlate cpap : forPlates) {
    if (cpap.getEntityId() == null) {
      throw new IllegalArgumentException("all members of 'forPlates' must already be persisted and have a database identifier");
    }
    forPlateIds.add(cpap.getEntityId());
  }

  for (LabCherryPick cherryPick : cherryPickRequest.getLabCherryPicks()) {
    if (cherryPick.isAllocated()) {
      CherryPickAssayPlate assayPlate = cherryPick.getAssayPlate();
      if (forPlates == null || (assayPlate != null && forPlateIds.contains(assayPlate.getEntityId()))) {
        Set<PlateType> sourcePlateTypes = (Set<PlateType>) assayPlate2SourcePlateTypes.get(assayPlate.getName());
        String fileName = makeFilename(cherryPick, sourcePlateTypes.size());
        result.put(fileName, cherryPick);
      }
    }
  }
  return result;
}
 
开发者ID:hmsiccbl,项目名称:screensaver,代码行数:45,代码来源:CherryPickRequestPlateMapFilesBuilder.java


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