@Test public void test_dscps() { HeaderSpace headerSpace = HeaderSpace.builder() .setDscps(ImmutableSet.of(1, 2, 3)) .setNotDscps(ImmutableSet.of(3, 4, 5)) .build(); BDD bdd = _toBDD.toBDD(headerSpace); BDDInteger dscp = _pkt.getDscp(); BDD dscpBDD = dscp.value(1).or(dscp.value(2)); assertThat(bdd, equalTo(dscpBDD)); }
@Nullable private BDD toBDD(Collection<Integer> ints, BDDInteger var) { if (ints == null || ints.isEmpty()) { return null; } return _bddOps.or(ints.stream().map(var::value).collect(Collectors.toList())); }
HeaderSpaceToBDD { @Nullable private BDD toBDD(Collection<Integer> ints, BDDInteger var) { if (ints == null || ints.isEmpty()) { return null; } return _bddOps.or(ints.stream().map(var::value).collect(Collectors.toList())); } }
HeaderSpaceToBDD { @Nullable private BDD toBDD(Collection<Integer> ints, BDDInteger var) { if (ints == null || ints.isEmpty()) { return null; } return _bddOps.or(ints.stream().map(var::value).collect(Collectors.toList())); } HeaderSpaceToBDD(BDDPacket bddPacket, Map<String, IpSpace> namedIpSpaces); }
HeaderSpaceToBDD { @Nullable private BDD toBDD(Collection<Integer> ints, BDDInteger var) { if (ints == null || ints.isEmpty()) { return null; } return _bddOps.or(ints.stream().map(var::value).collect(Collectors.toList())); } HeaderSpaceToBDD(BDDPacket bddPacket, Map<String, IpSpace> namedIpSpaces); IpSpaceToBDD getDstIpSpaceToBdd(); IpSpaceToBDD getSrcIpSpaceToBdd(); BDD toBDD(HeaderSpace headerSpace); }
HeaderSpaceToBDD { @Nullable private BDD toBDD(Collection<Integer> ints, BDDInteger var) { if (ints == null || ints.isEmpty()) { return null; } return _bddOps.or(ints.stream().map(var::value).collect(Collectors.toList())); } HeaderSpaceToBDD(BDDPacket bddPacket, Map<String, IpSpace> namedIpSpaces); IpSpaceToBDD getDstIpSpaceToBdd(); IpSpaceToBDD getSrcIpSpaceToBdd(); BDD toBDD(HeaderSpace headerSpace);  }