Package ch.hslu.exercises.sw04.ex1
Interface Table<T>
- All Known Implementing Classes:
HashTable
public interface Table<T>
-
Method Summary
-
Method Details
-
add
Add Element to Table.- Parameters:
element
- to be added- Returns:
- true if element could be added, false if not
-
remove
Remove element from Table.- Parameters:
element
- to be removed.- Returns:
- true if element was removed, false if not
-
contains
Checks if an element is in the table.- Parameters:
element
- to be checked- Returns:
- true if present, false if not
-
size
int size()Return the amount of elements in the table.- Returns:
- the amount of elements
-