public HashNode(string c, string s, float rC, T newObj) { crsID = c; secID = s; obj = newObj; next = null; remClass = rC; }
public HashNode <T> getItem(string cID, string sID) { HashNode <T> temp = head; while (temp != null) { if ((temp.crsID == cID) && (temp.secID == sID)) { return(temp); } temp = temp.next; } return(null); }
public void Add(HashNode <T> node) { if (head == null) { head = node; } else { HashNode <T> temp = head; while (temp.next != null) { temp = temp.next; } temp.next = node; } }
public void chkAllInsert(ref List <string[]> list) { //List<string[]> list = new List<string[]>(); HashNode <T> temp = head; while (temp != null) { if (temp.remClass != 0) { string[] s = new string[3]; s[0] = temp.crsID; s[1] = temp.secID; s[2] = temp.remClass.ToString(); list.Add(s); } temp = temp.next; } //return list; }
public HashList() { head = null; }
public void insertEntry(String cID, HashNode <T> node) {//to insert in the domain of the slot table[getHashVal(cID)].Add(node); count++; //count++; }