// uses list as base, takes in key and data, uses hashmap node
var HashMap:=class List
(
	var init:=method[]
	(
		super;
	);	
	
	var hsearch:=method[key]
	{
		var itsy:=hgetiterator[];		
		while (itsy.hasNext[])
		{
			var thetest:=itsy.next[];
			if (thetest==null) return null;
			if (thetest.gethash[]==key || thetest.gethash[]=key)
			(
				return thetest;
			); 
		};
		return null;
	};
	
	var hremove:=method[key]
	{
			var theno:=hsearch[key];
			if (theno!=null)
			(
				if (theno.getprev[]!=null)
				(
					(theno.getprev[]).setnext[theno.getnext[]];
				);
				
				if (theno.getnext[]!=null)
				(
					(theno.getnext[]).setprev[theno.getprev[]];
				);
			);
	};
	
	var hget:=method[key]
	{
		var tv:=hsearch[key];		
		if (tv==null)
		(
			return null;
		) else (
			return tv.getdata[];
		);
	};
	
	var hput:=method[key,data]
	{	
		var tv:=hsearch[key];
		if (tv==null)
		{
			var hn:=new hashnode[];
			hn.setdata[data];
			hn.sethash[key];
			addtohead[hn];
		} else {
			tv.setdata[data];
		};
	};
	
	var hgetiterator:=method[] return new iterator[this];
	
);