예제 #1
0
        public Collection <V> values()
        {
            Collection <V>     vs   = new Collection <V>();
            LinkMapNode <K, V> temp = head.next;

            for (; ;)
            {
                if (temp == tail)
                {
                    return(vs);
                }
                vs.Add(temp.getV());
                temp = temp.next;
            }
        }
예제 #2
0
        public V get(K key)
        {
            LinkMapNode <K, V> temp = head.next;

            for (; ;)
            {
                if (temp == tail)
                {
                    return(default(V));
                }
                if (key.Equals(temp.getK()) && temp != tail && temp != head)
                {
                    return(temp.getV());
                }
                temp = temp.next;
            }
        }
예제 #3
0
        public bool containsValue(V value)
        {
            LinkMapNode <K, V> temp = head.next;

            for (; ;)
            {
                if (temp == tail)
                {
                    return(false);
                }
                if (value.Equals(temp.getV()))
                {
                    return(true);
                }
                temp = temp.next;
            }
        }