public Map<K, V> flatten() { Map<K, V> map = new LinkedHashMap<>(); for (Map.Entry<K, List<V>> entry : entrySet()) { List<V> v = entry.getValue(); if (v == null || v.isEmpty()) continue; map.put(entry.getKey(), v.get(0)); } return map; }
public Map<K,V> flatten() { Map<K,V> map = new LinkedHashMap<K,V>(); for (Map.Entry<K,List<V>> entry : entrySet()) { List<V> v = entry.getValue(); if (v == null || v.isEmpty()) continue; map.put(entry.getKey(), v.get(0)); } return map; }
public Map<K, V> flatten() { Map<K, V> map = new LinkedHashMap<>(); for (Map.Entry<K, List<V>> entry : entrySet()) { List<V> v = entry.getValue(); if (v == null || v.isEmpty()) continue; map.put(entry.getKey(), v.get(0)); } return map; }
public Map<K,V> flatten() { Map<K,V> map = new LinkedHashMap<K,V>(); for (Map.Entry<K,List<V>> entry : entrySet()) { List<V> v = entry.getValue(); if (v == null || v.isEmpty()) continue; map.put(entry.getKey(), v.get(0)); } return map; }
public Map<K, V> flatten() { Map<K, V> map = new LinkedHashMap<>(); for (Map.Entry<K, List<V>> entry : entrySet()) { List<V> v = entry.getValue(); if (v == null || v.isEmpty()) continue; map.put(entry.getKey(), v.get(0)); } return map; }
public Map<K, V> flatten() { Map<K, V> map = new LinkedHashMap<>(); for (Map.Entry<K, List<V>> entry : entrySet()) { List<V> v = entry.getValue(); if (v == null || v.isEmpty()) continue; map.put(entry.getKey(), v.get(0)); } return map; }
public MultiMap(MultiMap<K,V> other) { keyClass = other.keyClass; valueClass = other.valueClass; noduplicates = other.noduplicates; for ( java.util.Map.Entry<K,List<V>> e : other.entrySet()) { addAll(e.getKey(), e.getValue()); } }
public boolean referred(PackageRef packageName) { // return true; for (Map.Entry<PackageRef, List<PackageRef>> contained : uses.entrySet()) { if (!contained.getKey() .equals(packageName)) { if (contained.getValue() .contains(packageName)) return true; } } return false; }
public <S extends K, T extends V> MultiMap(MultiMap<S, T> other) { keyClass = other.keyClass; valueClass = other.valueClass; noduplicates = other.noduplicates; for (java.util.Map.Entry<S, List<T>> e : other.entrySet()) { addAll(e.getKey(), e.getValue()); } }
public MultiMap(MultiMap<K,V> other) { keyClass = other.keyClass; valueClass = other.valueClass; noduplicates = other.noduplicates; for ( java.util.Map.Entry<K,List<V>> e : other.entrySet()) { addAll(e.getKey(), e.getValue()); } }
public <S extends K, T extends V> MultiMap(MultiMap<S, T> other) { keyClass = other.keyClass; valueClass = other.valueClass; noduplicates = other.noduplicates; for (java.util.Map.Entry<S, List<T>> e : other.entrySet()) { addAll(e.getKey(), e.getValue()); } }
public <S extends K, T extends V> MultiMap(MultiMap<S, T> other) { keyClass = other.keyClass; valueClass = other.valueClass; noduplicates = other.noduplicates; for (java.util.Map.Entry<S, List<T>> e : other.entrySet()) { addAll(e.getKey(), e.getValue()); } }
public boolean referred(PackageRef packageName) { // return true; for (Map.Entry<PackageRef,List<PackageRef>> contained : uses.entrySet()) { if (!contained.getKey().equals(packageName)) { if (contained.getValue().contains(packageName)) return true; } } return false; }
public MultiMap(MultiMap<K,V> other) { keyClass = other.keyClass; valueClass = other.valueClass; noduplicates = other.noduplicates; for ( java.util.Map.Entry<K,List<V>> e : other.entrySet()) { addAll(e.getKey(), e.getValue()); } }
public boolean referred(PackageRef packageName) { // return true; for (Map.Entry<PackageRef,List<PackageRef>> contained : uses.entrySet()) { if (!contained.getKey().equals(packageName)) { if (contained.getValue().contains(packageName)) return true; } } return false; }
public <S extends K, T extends V> MultiMap(MultiMap<S, T> other) { keyClass = other.keyClass; valueClass = other.valueClass; noduplicates = other.noduplicates; for (java.util.Map.Entry<S, List<T>> e : other.entrySet()) { addAll(e.getKey(), e.getValue()); } }
public boolean referred(PackageRef packageName) { // return true; for (Map.Entry<PackageRef,List<PackageRef>> contained : uses.entrySet()) { if (!contained.getKey().equals(packageName)) { if (contained.getValue().contains(packageName)) return true; } } return false; }
public MultiMap<V,K> transpose() { MultiMap<V,K> inverted = new MultiMap<V,K>(); for (Map.Entry<K,List<V>> entry : entrySet()) { K key = entry.getKey(); List<V> value = entry.getValue(); if (value == null) continue; for (V v : value) inverted.add(v, key); } return inverted; }
public MultiMap<V, K> transpose() { MultiMap<V, K> inverted = new MultiMap<>(); for (Map.Entry<K, List<V>> entry : entrySet()) { K key = entry.getKey(); List<V> value = entry.getValue(); if (value == null) continue; for (V v : value) inverted.add(v, key); } return inverted; }
private void init(Parameters augments) throws Exception { MultiMap<Requirement, Augment> operations = new MultiMap<>(); for (Map.Entry<String, Attrs> e : augments.entrySet()) { String bsn = e.getKey(); Attrs attrs = e.getValue(); createAugmentOperation(operations, bsn, attrs); } Map<Requirement, Collection<Capability>> allBundles = repository.findProviders(operations.keySet()); for (Entry<Requirement, List<Augment>> e : operations.entrySet()) { executeAugmentOperations(allBundles, e.getKey(), e.getValue()); } }