private boolean searchUpForNextSubsetNode( Node node, K key, Object[] ret ) {

        if( node.mRight != null && mComp.compareMinToMax( node.mKey, key ) < 0 &&
            mComp.compareMinToMax( key, node.mRight.mMaxStop.mKey ) < 0 )
        {
            // Request downard search on right subtree.
            ret[0] = node.mRight;
            return false;
        }

        while( node.mParent != null ) {
            if( node == node.mParent.mRight ) {
                node = node.mParent;
            } else {
                node = node.mParent;

                // If we're coming from the left path, it means we haven't
                // checked the
                // current node or right subtree.

                // We'd would never search to the left of a node that started
                // before the mKey,
                // so don't bother checking mins.
                if( mComp.compareMaxes( key, node.mKey ) >= 0 ) {
                    ret[0] = node;
                    return true;
                }

                // Check if the right node might be contained.
                if( node.mRight != null ) {
                    ret[0] = node.mRight;
                    return false;
                }
            }
        }

        // Search is complete.
        ret[0] = null;
        return true;

    }