Esempio n. 1
0
	int count(const char* key){
		DynArray<int> * a = valarray->get(keys->indexofVal(key));
		int count = 0;
		for(int i = 0; i<a->getLength();i++){
			if(a->get(i) >= 0){
				count++;
			}	
		}
		return count;
	}
Esempio n. 2
0
	void set(const char * key, int val){
		if(keys->isIn(key)){
			valarray->get(keys->indexofVal(key))->add(val);
		}
		else{
			keys->add(key);
			DynArray<int> *vala = new DynArray<int>();
			vala->add(val);
			valarray->add(vala);
		}
			
	}
Esempio n. 3
0
	DynArray<int>* getAll(const char* key){
		return valarray->get(keys->indexofVal(key));
	}
Esempio n. 4
0
	void removeAll(const char* key){
		valarray->get(keys->indexofVal(key))->clear();	
		
	}