-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhashtable.h
More file actions
23 lines (19 loc) · 1023 Bytes
/
hashtable.h
File metadata and controls
23 lines (19 loc) · 1023 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifndef HASHTABLE_H
#define HASHTABLE_H
#include "linkedlist.h"
typedef struct HashTable HashTable;
typedef int HashFunction (void* key);
HashTable* hashTableInit( int capacity, HashFunction * hashFunction, ObjectType * keyType, ObjectType * elementType );
HashTable* hashTableInitWithPrintProperties( int capacity, HashFunction * hashFunction, ObjectType * keyType, ObjectType * elementType, MapPrintProperties * printProperties);
void hashTableDestroy(HashTable * hashtable);
bool hashTablePut(HashTable * hashtable, void* key, void* element);
void* hashTableGet(HashTable * hashtable, void* key);
bool hashTableContains(HashTable * hashtable, void* key);
void hashTableRemove(HashTable * hashtable, void* key);
void hashTableClear(HashTable * hashtable);
int hashTableSize(HashTable * hashtable);
int hashTableCapacity(HashTable * hashtable);
void hashTablePrint(HashTable * hashtable);
char* hashTableToString(HashTable * hashtable);
Iterator * hashTableIteratorInit(HashTable * hashtable);
#endif // HASHTABLE_H