boolean (@NotNull K key, @NotNull V value) { Object current = myMap.get(key); if (current == null) { return false; } else if (current instanceof ValueList) { //noinspection unchecked return ((List<V>)current).remove(value); } else if (value.equals(current)) { myMap.remove(key); return true; } return false; }