public V add(V o, int conflictBehavior, int equalBehavior) { K key = keyer.getKeyFor(o); V old = theMap.get(key); if (old == null || (eq(o, old) ? checkAdd(equalBehavior, old) : checkAdd(conflictBehavior, old))) theMap.put(key, o); return old; }
public V replace(V v) { return theMap.put(keyer.getKeyFor(v), v); }