public Object setValue(Object value) { Object key = MapEntry.this.getKey(); if (parent.maps[1].containsKey(value) && parent.maps[1].get(value) != key) { throw new IllegalArgumentException("Cannot use setValue() when the object being set is already in the map"); } parent.put(key, value); final Object oldValue = super.setValue(value); return oldValue; } }
public Object setValue(Object value) { Object key = MapEntry.this.getKey(); if (parent.maps[1].containsKey(value) && parent.maps[1].get(value) != key) { throw new IllegalArgumentException("Cannot use setValue() when the object being set is already in the map"); } parent.put(key, value); final Object oldValue = super.setValue(value); return oldValue; } }
public Object setValue(Object value) { Object key = MapEntry.this.getKey(); if (parent.maps[1].containsKey(value) && parent.maps[1].get(value) != key) { throw new IllegalArgumentException("Cannot use setValue() when the object being set is already in the map"); } parent.put(key, value); final Object oldValue = super.setValue(value); return oldValue; } }
public Object setValue(Object value) { Object key = MapEntry.this.getKey(); if (parent.maps[1].containsKey(value) && parent.maps[1].get(value) != key) { throw new IllegalArgumentException("Cannot use setValue() when the object being set is already in the map"); } parent.put(key, value); final Object oldValue = super.setValue(value); return oldValue; } }
public Object setValue(Object value) { Object key = MapEntry.this.getKey(); if (parent.maps[1].containsKey(value) && parent.maps[1].get(value) != key) { throw new IllegalArgumentException("Cannot use setValue() when the object being set is already in the map"); } parent.put(key, value); final Object oldValue = super.setValue(value); return oldValue; } }
public Object setValue(Object value) { Object key = MapEntry.this.getKey(); if (parent.maps[1].containsKey(value) && parent.maps[1].get(value) != key) { throw new IllegalArgumentException("Cannot use setValue() when the object being set is already in the map"); } parent.put(key, value); final Object oldValue = super.setValue(value); return oldValue; } }
public Object setValue(Object value) { Object key = MapEntry.this.getKey(); if (parent.maps[1].containsKey(value) && parent.maps[1].get(value) != key) { throw new IllegalArgumentException("Cannot use setValue() when the object being set is already in the map"); } parent.put(key, value); final Object oldValue = super.setValue(value); return oldValue; } }