public ListTransactionsOptions filterStates(Collection<TransactionState> states) {
        this.filteredStates = new HashSet<>(states);
        return this;
    }
Filter only the transactions that are in a specific set of states. If no filter
is specified or if the passed set of states is empty, then transactions in all
states will be returned.

@param states the set of states to filter by
@return this object
clients/src/main/java/org/apache/kafka/clients/admin/ListTransactionsOptions.java