Пример #1
0
        public MyMapNode popLast()
        {
            MyMapNode tempNode = head;

            while (!tempNode.getNext().Equals(tail))
            {
                tempNode = tempNode.getNext();
            }
            this.tail = tempNode;
            tempNode  = tail.getNext();
            tempNode  = null;
            return(tempNode);
        }
Пример #2
0
        public MyMapNode search(string key)
        {
            MyMapNode tempNode = head;

            while (tempNode != null && tempNode.getNext() != null)
            {
                if (tempNode.getKey().Equals(key))
                {
                    return(tempNode);
                }
                tempNode = tempNode.getNext();
            }
            return(null);
        }
Пример #3
0
        public MyMapNode pop()
        {
            MyMapNode tempNode = this.head;

            this.head = head.getNext();
            return(tempNode);
        }