@Test public void testSwapMultiVar() { BDDPacket pkt = new BDDPacket(); BDDInteger dstIp = pkt.getDstIp(); BDDInteger srcIp = pkt.getSrcIp(); BDDInteger dstPort = pkt.getDstPort(); BDDInteger srcPort = pkt.getSrcPort(); Ip ip1 = Ip.parse("1.1.1.1"); Ip ip2 = Ip.parse("2.2.2.2"); BDD orig = andNull( dstIp.value(ip1.asLong()), dstPort.value(5), srcIp.value(ip2.asLong()), srcPort.value(7)); BDD swapped = andNull( srcIp.value(ip1.asLong()), srcPort.value(5), dstIp.value(ip2.asLong()), dstPort.value(7)); assertThat(swap(orig, dstIp, srcIp, dstPort, srcPort), equalTo(swapped)); }
public static BDD swap(BDD bdd, BDDInteger... vars) { return bdd.replace(swapPairing(vars)); }
BDDUtils { public static BDD swap(BDD bdd, BDDInteger... vars) { return bdd.replace(swapPairing(vars)); } }
BDDUtils { public static BDD swap(BDD bdd, BDDInteger... vars) { return bdd.replace(swapPairing(vars)); }  }
BDDUtils { public static BDD swap(BDD bdd, BDDInteger... vars) { return bdd.replace(swapPairing(vars)); }  static BDDFactory bddFactory(int numVariables); static BDD swap(BDD bdd, BDDInteger... vars); static BDDPairing swapPairing(BDDInteger... vars); }
BDDUtils { public static BDD swap(BDD bdd, BDDInteger... vars) { return bdd.replace(swapPairing(vars)); }  static BDDFactory bddFactory(int numVariables); static BDD swap(BDD bdd, BDDInteger... vars); static BDDPairing swapPairing(BDDInteger... vars);  }