class CommunityMatchExprToBDD implements CommunityMatchExprVisitor<BDD, Arg> {

  @Override
  public BDD visitCommunityMatchAll(CommunityMatchAll communityMatchAll, Arg arg) {
    return communityMatchAll.getExprs().stream()
        .map(expr -> expr.accept(this, arg))
        .reduce(BDDRoute.factory.one(), BDD::and);
  }

}