コード例 #1
0
 public HashNode(string c, string s, float rC, T newObj)
 {
     crsID    = c;
     secID    = s;
     obj      = newObj;
     next     = null;
     remClass = rC;
 }
コード例 #2
0
        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);
        }
コード例 #3
0
        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;
            }
        }
コード例 #4
0
        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;
        }
コード例 #5
0
 public HashList()
 {
     head = null;
 }
コード例 #6
0
 public void insertEntry(String cID, HashNode <T> node)
 {//to insert in the domain of the slot
     table[getHashVal(cID)].Add(node);
     count++;
     //count++;
 }