mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
AppCode: compacting FileSymbolTables after building/loading
This commit is contained in:
@@ -30,7 +30,7 @@ public class LinkedMultiMap<K, V> extends MultiMap<K, V> {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Map<K, Collection<V>> createMap(int i, float v) {
|
||||
return new LinkedHashMap<K, Collection<V>>(i, v);
|
||||
protected Map<K, Collection<V>> createMap(int initialCapacity, float loadFactor) {
|
||||
return new LinkedHashMap<K, Collection<V>>(initialCapacity, loadFactor);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ import java.util.Set;
|
||||
public class MostlySingularMultiMap<K, V> implements Serializable {
|
||||
private static final long serialVersionUID = 2784448345881807109L;
|
||||
|
||||
private final Map<K, Object> myMap = new THashMap<K, Object>();
|
||||
private final THashMap<K, Object> myMap = new THashMap<K, Object>();
|
||||
|
||||
public void add(K key, V value) {
|
||||
Object current = myMap.get(key);
|
||||
@@ -108,6 +108,10 @@ public class MostlySingularMultiMap<K, V> implements Serializable {
|
||||
return Collections.singleton((V)value);
|
||||
}
|
||||
|
||||
public void compact() {
|
||||
myMap.compact();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "{" + StringUtil.join(myMap.entrySet(), new Function<Map.Entry<K, Object>, String>() {
|
||||
|
||||
@@ -34,7 +34,7 @@ public class MultiMap<K, V> implements Serializable {
|
||||
};
|
||||
private static final long serialVersionUID = -2632269270151455493L;
|
||||
|
||||
private final Map<K, Collection<V>> myMap;
|
||||
protected final Map<K, Collection<V>> myMap;
|
||||
private Collection<V> values;
|
||||
|
||||
public MultiMap() {
|
||||
@@ -49,8 +49,8 @@ public class MultiMap<K, V> implements Serializable {
|
||||
return new HashMap<K, Collection<V>>();
|
||||
}
|
||||
|
||||
protected Map<K, Collection<V>> createMap(int i, float v) {
|
||||
return new HashMap<K, Collection<V>>(i, v);
|
||||
protected Map<K, Collection<V>> createMap(int initialCapacity, float loadFactor) {
|
||||
return new HashMap<K, Collection<V>>(initialCapacity, loadFactor);
|
||||
}
|
||||
|
||||
protected Collection<V> createCollection() {
|
||||
|
||||
Reference in New Issue
Block a user