src/main/java/com/hedera/hashgraph/identity/hcs/MessageListener.java
/**
   * Adds a custom filter for topic responses from a mirror node.
   * Messages that do not pass the test are skipped before any other checks are run.
   *
   * @param filter The filter function.
   * @return This listener instance.
   */
Adds a custom filter for topic responses from a mirror node.
Messages that do not pass the test are skipped before any other checks are run.

@param filter The filter function.
@return This listener instance.
Adds a custom filter for topic responses from a mirror node . Messages that do not pass the test are skipped before any other checks are run . @param filter The filter function . @return This listener instance .
public MessageListener<T> addFilter(final Predicate<TopicMessage> filter) {
    if (filters == null) {
      filters = new ArrayList<>();
    }
    filters.add(filter);
    return this;
  }
public MessageListener < T > addFilter ( final Predicate < TopicMessage > filter ) { if ( filters == null ) { filters = new ArrayList < > ( ) ; } filters . add ( filter ) ; return this ; }
Adds a custom filter for topic responses from a mirror node.
Adds a custom filter for topic responses from a mirror node .