Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void update(String key, String oldValue, String newValue){
- if(dictionary.containsKey(key)){
- if(lookup(key).containsValue(oldValue)){
- List<String> tmp = new ArrayList<>();
- tmp = dictionary.get(key);
- tmp.remove(oldValue);
- tmp.add(newValue);
- dictionary.put(key, tmp);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement