class PacketHeaderConstraintsUtil {

  @VisibleForTesting
  public static Flow.Builder toFlow(
      BDDPacket pkt, PacketHeaderConstraints phc, IpSpace srcIps, IpSpace dstIps)
      throws IllegalArgumentException {
    return pkt.getFlow(toBDD(pkt, phc, srcIps, dstIps))
        .orElseThrow(() -> new BatfishException("could not convert header constraints to flow"));
  }

}