@Test public void test_fragmentOffsets() { HeaderSpace headerSpace = HeaderSpace.builder() .setFragmentOffsets(ImmutableSet.of(new SubRange(0, 5))) .setNotFragmentOffsets(ImmutableSet.of(new SubRange(2, 6))) .build(); BDD bdd = _toBDD.toBDD(headerSpace); BDDInteger fragmentOffset = _pkt.getFragmentOffset(); BDD fragmentOffsetBDD = fragmentOffset.value(0).or(fragmentOffset.value(1)); assertThat(bdd, equalTo(fragmentOffsetBDD)); }
@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);  }