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; } }
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; } }
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; } }