public HopDirective removeDirective(int i) {
        cache = null;
        return selector.remove(i);
    }
<p>Removes the directive at the given index.</p>

@param i The index of the directive to remove.
@return The removed directive.
messagebus/src/main/java/com/yahoo/messagebus/routing/Hop.java