- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
private static class NoNullListMap<KEY, VALUES> extends HashMap<KEY, List<VALUES>> {
@Override
public List<VALUES> get(Object key) {
List<VALUES> res = super.get(key);
if (res == null) {
res = new ArrayList();
super.put((KEY) key, res);
}
return res;
}
}
stasmarkin 16.05.2015 20:28 # 0
dematomCom 17.08.2015 02:43 # 0