Implementato HashCode Dictionary via LinearProbing (Open Adress) e Chaining.
This commit is contained in:
25
map/Map.java
Normal file
25
map/Map.java
Normal file
@@ -0,0 +1,25 @@
|
||||
package map;
|
||||
|
||||
import priorityqueue.Entry;
|
||||
|
||||
import java.security.InvalidKeyException;
|
||||
|
||||
public interface Map<K,V> {
|
||||
|
||||
public int size();
|
||||
|
||||
public boolean isEmpty();
|
||||
|
||||
public V put(K key, V value) throws InvalidKeyException;
|
||||
|
||||
public V get(K key) throws InvalidKeyException;
|
||||
|
||||
public V remove(K key) throws InvalidKeyException;
|
||||
|
||||
public Iterable<K> keys();
|
||||
|
||||
public Iterable<V> values();
|
||||
|
||||
public Iterable<Entry<K,V>> entries();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user