protocols/src/test/java/eu/internetofus/common/protocols/AbstractProtocolITC.java
/**
   * Create the predicate over a user interaction.
   *
   * @return the predicate for the interaction.
   *
   * @see #app
   * @see #task
   * @see #taskType
   * @see #community
   */
Create the predicate over a user interaction.
@return the predicate for the interaction.


Create the predicate over a user interaction . @return the predicate for the interaction .
protected Predicate<Interaction> createInteractionPredicate() {
    return interaction -> {
      if (this.app != null && !this.app.appId.equals(interaction.appId)) {
        return false;
      }
      if (this.community != null && !this.community.id.equals(interaction.communityId)) {
        return false;
      }
      if (this.taskType != null && !this.taskType.id.equals(interaction.taskTypeId)) {
        return false;
      }
      if (this.task != null && !this.task.id.equals(interaction.taskId)) {
        return false;
      }
      return true;
    };
  }
protected Predicate < Interaction > createInteractionPredicate ( ) { return interaction -> { if ( this . app != null && ! this . app . appId . equals ( interaction . appId ) ) { return false ; } if ( this . community != null && ! this . community . id . equals ( interaction . communityId ) ) { return false ; } if ( this . taskType != null && ! this . taskType . id . equals ( interaction . taskTypeId ) ) { return false ; } if ( this . task != null && ! this . task . id . equals ( interaction . taskId ) ) { return false ; } return true ; } ; }
Create the predicate over a user interaction.
Create the predicate over a user interaction .