-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIMap.java
More file actions
29 lines (19 loc) · 740 Bytes
/
IMap.java
File metadata and controls
29 lines (19 loc) · 740 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package spellcheck;
import java.util.Iterator;
/** Interface your map has to implement */
public interface IMap {
/** Inserts an entry to the map. Throws exception if key is
* already present */
public void insert(String key) throws MapException;
/** Removes the entry with the specified key from the map. Throws
* MapException if no entry with key in the map */
public void remove(String key)throws MapException;
/** Returns true if there is entry with specified key in the
* map */
public boolean find(String key);
/** Returns the number of elements stored in the map */
public int numberOfElements();
/** Returns iterator object over all elements stored in the
* map */
public Iterator<String> elements();
}