@Test public void test_notPacketLengths() { SubRange positive = new SubRange(100, 200); SubRange negative = new SubRange(111, 189); HeaderSpace headerSpace = HeaderSpace.builder() .setPacketLengths(ImmutableList.of(positive)) .setNotPacketLengths(ImmutableList.of(negative)) .build(); SubRange range1 = new SubRange(100, 110); SubRange range2 = new SubRange(190, 200); BDDPacketLength packetLength = _pkt.getPacketLength(); BDD expected = packetLength .range(range1.getStart(), range1.getEnd()) .or(packetLength.range(range2.getStart(), range2.getEnd())); assertEquals(expected, _toBDD.toBDD(headerSpace)); }
@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);  }