public MessageBatch replace(Predicate<Message> filter, Message replacement, boolean match_all) {
        replaceIf(filter, replacement, match_all);
        return this;
    }
public MessageBatch replace ( Predicate < Message > filter , Message replacement , boolean match_all ) { replaceIf ( filter , replacement , match_all ) ; return this ; }
Replaces all messages which match a given filter with a replacement message
@param filter the filter. If null, no changes take place. Note that filter needs to be able to handle null msgs
@param replacement the replacement message. Can be null, which essentially removes all messages matching filter
@param match_all whether to replace the first or all matches
@return the MessageBatch