Exemple #1
0
        public int get(string key)
        {
            int          index        = this.getBucketIndex(key);
            MyLinkedList myLinkedList = this.myBucketArray[index];

            if (myLinkedList == null)
            {
                return(0);
            }
            MyMapNode myMapNode = (MyMapNode)myLinkedList.search(key);

            return((myMapNode == null) ? 0 : myMapNode.getValue());
        }
Exemple #2
0
        public int get(string key)
        {
            MyMapNode myMapNode = (MyMapNode)this.myLinkedList.search(key);

            return((myMapNode == null) ? 0 : myMapNode.getValue());
        }