- 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;
}
}