src/main/java/org/organicdesign/fp/collections/PersistentTreeMap.java
@Override public Option<UnmodMap.UnEntry<K,V>> entry(K key) {
        Node<K,V> t = tree;
        while (t != null) {
            int c = comp.compare(key, t.getKey());
            if (c == 0)
                return Option.some(t);
            else if (c < 0)
                t = t.left();
            else
                t = t.right();
        }
        return Option.none(); // t; // t is always null
    }
@Override public Option<UnmodMap.UnEntry<K,V>> entry(K key) {
        Node<K,V> t = tree;
        while (t != null) {
            int c = comp.compare(key, t.getKey());
            if (c == 0)
                return Option.some(t);
            else if (c < 0)
                t = t.left();
            else
                t = t.right();
        }
        return Option.none(); // t; // t is always null
    }
@ Override public Option < UnmodMap . UnEntry < K , V > > entry ( K key ) { Node < K , V > t = tree ; while ( t != null ) { int c = comp . compare ( key , t . getKey ( ) ) ; if ( c == 0 ) return Option . some ( t ) ; else if ( c < 0 ) t = t . left ( ) ; else t = t . right ( ) ; } return Option . none ( ) ; // t; // t is always null }
Returns an Option of the key/value pair matching the given key, or Option.none() if the key is
not found.
Returns an Option of the key / value pair matching the given key or Option . none () if the key is not found .