Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public V remove(Object key){
- V old_value = get(key, entries);
- int place = compress(key, entries.length);
- while (place < entries.length) {
- if (entries[place] != null) {
- if (entries[place].getKey().equals(key)) {
- System.out.println("Removed the entry for key "+key);
- entries[place] = null;
- }
- }
- place++;
- }
- return old_value;
- }
Advertisement
Add Comment
Please, Sign In to add comment