class MatchLineQuery implements SearchFiltersQuery {

  @Override
  @Nonnull
  public BDD getMatchingBdd(IpAccessList acl, IpAccessListToBdd ipAccessListToBdd, BDDPacket pkt) {
    checkArgument(canQuery(acl), "ACL %s is too short to apply match line query", acl.getName());

    // Generate BDD matching all flows that would match the target line, then subtract out the BDD
    // of all flows matched by any previous line
    BDD matchingTargetLine =
        ipAccessListToBdd.toPermitAndDenyBdds(acl.getLines().get(_lineNum)).getMatchBdd();
    List<BDD> prevLineBdds =
        IntStream.range(0, _lineNum)
            .mapToObj(
                i -> ipAccessListToBdd.toPermitAndDenyBdds(acl.getLines().get(i)).getMatchBdd())
            .collect(ImmutableList.toImmutableList());
    return matchingTargetLine.diff(pkt.getFactory().orAll(prevLineBdds));
  }

    MatchLineQuery(int lineNum);

}