// // Created by lukas on 07.04.19. // #ifndef QT5PROJECT_HASHMAP_H #define QT5PROJECT_HASHMAP_H #include #include template class Hashmap { public: void add(keytype key, keytype value); keytype getKey(int position); valuetype getValue(int position); int size(); private: std::vector keys; std::vector values; }; template void Hashmap::add(keytype key, keytype value) { keys.push_back(key); values.push_back(value); } template keytype Hashmap::getKey(int position) { return keys.at(position); } template valuetype Hashmap::getValue(int position) { return values.at(position); } template int Hashmap::size() { return keys.size(); } #endif //QT5PROJECT_HASHMAP_H