Java 类org.apache.commons.collections4.map.DefaultedMap 实例源码

项目:gatk    文件:StandardCallerArgumentCollection.java   
/**
 * Returns the sample contamination or CONTAMINATION_FRACTION if no contamination level was specified for this sample.
 */
public Double getSampleContamination(final String sampleId){
    Utils.nonNull(sampleId);
    if (sampleContamination == null){
        setSampleContamination(new DefaultedMap<>(CONTAMINATION_FRACTION));//default to empty map
    }
    return sampleContamination.get(sampleId);
}
项目:sqlapp    文件:SimpleNumberingStore.java   
@Override
public void afterPropertiesSet() {
    currentValueMap = DefaultedMap.defaultedMap(new HashMap<String, Long>(), Long.valueOf(0L));
    lockMap = new HashMap<String, Lock>();
}
项目:gatk    文件:StandardCallerArgumentCollection.java   
public void setSampleContamination(final DefaultedMap<String, Double> sampleContamination) {
    this.sampleContamination = new DefaultedMap<>(CONTAMINATION_FRACTION);  //NOTE: a bit weird because it ignores the default from the argument and uses ours
    this.sampleContamination.putAll(sampleContamination);                   //make a copy to be safe
}
项目:springapp    文件:SimpleNumberingStore.java   
@Override
public void afterPropertiesSet() {
    currentValueMap = DefaultedMap.defaultedMap(new HashMap<String, Long>(), Long.valueOf(0L));
    lockMap = new HashMap<String, Lock>();
}