public Collection <K> keys() { Collection <K> ks = new Collection <K>(); LinkMapNode <K, V> temp = head.next; for (; ;) { if (temp == tail) { return(ks); } ks.Add(temp.getK()); temp = temp.next; } }
public LinkMapNode <K, V> getNode(K key) { LinkMapNode <K, V> temp = tail.prev; for (; ;) { if (temp == head) { return(null); } if (key.Equals(temp.getK())) { return(temp); } temp = temp.prev; } }
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 containsKey(K key) { LinkMapNode <K, V> temp = head.next; for (; ;) { if (temp == tail) { return(false); } if (key.Equals(temp.getK())) { return(true); } temp = temp.next; } }