org.apache.commons.collections.MultiMap.values()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(2.4k)|赞(0)|评价(0)|浏览(105)

本文整理了Java中org.apache.commons.collections.MultiMap.values()方法的一些代码示例,展示了MultiMap.values()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MultiMap.values()方法的具体详情如下:
包路径:org.apache.commons.collections.MultiMap
类名称:MultiMap
方法名:values

MultiMap.values介绍

[英]Gets a collection containing all the values in the map.

Inplementations typically return a collection containing the combination of values from all keys. This cannot be mandated due to backwards compatability of this interface.
[中]获取包含映射中所有值的集合。
inImplementation通常返回一个集合,其中包含所有键的值的组合。由于此接口向后兼容,因此无法强制执行此操作。

代码示例

代码示例来源:origin: org.jsmiparser/jsmiparser-api

@SuppressWarnings("unchecked")
public Collection<T> getAll() {
  return m_impl.values();
}

代码示例来源:origin: org.jsmiparser/jsmiparser-util

public Collection<V> values() {
  return m_impl.values();
}

代码示例来源:origin: org.jsmiparser/jsmiparser-util

public int size() {
  // olala this is tricky stuff: the Commons MultiMap size is the number of entries in the map
  // but what we really want is the total number of symbols in our symbol maps
  return m_impl.values().size();
}

代码示例来源:origin: org.jsmiparser/jsmiparser-api

@SuppressWarnings("unchecked")
public Iterator<T> iterator() {
  return m_impl.values().iterator();
}

代码示例来源:origin: org.integratedmodelling/klab-common

for (Object o : roles.values()) {
  RoleDescriptor rd = (RoleDescriptor) o;
  if (rd.within.is(observable)) {

代码示例来源:origin: org.integratedmodelling/klab-common

public static void removeRolesFor(INamespace namespace) {
  List<Pair<IConcept, RoleDescriptor>> toRemove = new ArrayList<>();
  for (Object o : roles.values()) {
    RoleDescriptor rd = (RoleDescriptor) o;
    if (rd.namespaceId.equals(namespace.getId())) {
      toRemove.add(new Pair<>(rd.role, rd));
    }
  }
  for (Pair<IConcept, RoleDescriptor> r : toRemove) {
    roles.remove(r.getFirst(), r.getSecond());
  }
}

代码示例来源:origin: qcadoo/mes

private Map<Entity, BigDecimal> getProductsAndQuantitiesMap(final MultiMap groupedProductQuantities, final Entity order) {
  Map<Entity, BigDecimal> map = new HashMap<Entity, BigDecimal>();
  for (Object pcq : groupedProductQuantities.values()) {
    Entity product = ((Entity) pcq).getBelongsToField(ProductionCountingQuantityFields.PRODUCT);
    BigDecimal quantityTaken = getProductQuantityTakenForOrder(product.getId(), order.getId());
    BigDecimal quantityUsed = getProductQuantityUsedInOrder(product.getId(), order.getId());
    BigDecimal diff = quantityTaken.subtract(quantityUsed);
    if (diff.compareTo(BigDecimal.ZERO) > 0) {
      map.put(product, diff);
    }
  }
  return map;
}

相关文章