package com.hubspot.blazar.base;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.base.Predicate;

import java.util.Set;

public class StepActivationCriteria implements Predicate<GitInfo> {
  private final Set<String> branches;

  @JsonCreator
  public StepActivationCriteria(@JsonProperty("branches") Set<String> branches) {
    this.branches = branches;
  }

  @Override
  public boolean apply(GitInfo input) {
    return branches.contains(input.getBranch());
  }
}

@@ -542,11 +542,74 @@
 ());%0A  %7D
+%0A%0A  public Set%3CString%3E getBranches() %7B%0A    return branches;%0A  %7D
 %0A%7D%0A

Add getter to make Jackson happy