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