}
public void addOccurence(int key, int value) {
if (mySingle.containsKey(key)) {
int old = mySingle.get(key);
TIntHashSet items = new TIntHashSet(3);
items.add(old);
items.add(value);
mySingle.remove(key);
myMulti.put(key, items);
return;
}
final TIntHashSet items = myMulti.get(key);
if (items != null) {
items.add(value);
return;
}
mySingle.put(key, value);
}