示例#1
0
 public void Add(Node706 node)
 {
     if (contain(node))
     {
         vList.Remove(node);
     }
     vList.AddLast(node);
 }
示例#2
0
        /** Returns the value to which the specified key is mapped, or -1 if this map contains no mapping for the key */
        public int Get(int key)
        {
            Node706 node = buketArr[hashCode(key)].Get(key);

            if (node != null)
            {
                return(node.value);
            }
            return(-1);
        }
示例#3
0
        public Node706 Get(int val)
        {
            Node706 node = new Node706(val, 0);

            if (contain(node))
            {
                return(vList.Find(node).Value);
            }
            return(null);
        }
示例#4
0
 bool contain(Node706 node)
 {
     return(vList.Find(node) != null);
 }
示例#5
0
 public void Remove(Node706 node)
 {
     vList.Remove(node);
 }