-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDictionaryInterface.java
40 lines (33 loc) · 1.13 KB
/
DictionaryInterface.java
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
29
30
31
32
33
34
35
36
37
38
39
40
/**
******************************************************************************
* HOMEWORK cs201
******************************************************************************
* Dictionary interface
******************************************************************************
*****************************************************************************
Do not modify this file.
*****************************************************************************/
public interface DictionaryInterface<AnyType extends Comparable<AnyType>>
{
/**
* Adds e to the dictionary.
*/
public void add(AnyType e);
/**
* Removes e from the dictionary.
*/
public void remove(AnyType e);
/**
* Returns true if the dictionary contains an element equal to e,
* otherwise - false;
*/
public boolean contains(AnyType e);
/**
* Returns the number of elements in the dictionary equal to e.
*/
public int frequency(AnyType e);
/**
* Combines the other dictionary with the dictionary.
*/
public void combine(Dictionary<AnyType> other);
}