Example #1
0
 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;
 }
Example #2
0
 public V replace(V v) {
   return theMap.put(keyer.getKeyFor(v), v);
 }