@Test public void testFragmentOffsetsToAclLineMatchExpr() { assertEquals( PacketHeaderConstraintsToAclLineMatchExprUtils.fragmentOffsetsToAclLineMatchExpr( IntegerSpace.of(new SubRange(10, 11))), match( HeaderSpace.builder() .setFragmentOffsets(ImmutableList.of(new SubRange(10, 11))) .build())); }
@Nullable static AclLineMatchExpr fragmentOffsetsToAclLineMatchExpr( @Nullable IntegerSpace fragmentOffsets) { return Optional.ofNullable(fragmentOffsets) .map(IntegerSpace::getSubRanges) .map(k -> match(HeaderSpace.builder().setFragmentOffsets(k).build())) .orElse(null); }
PacketHeaderConstraintsToAclLineMatchExprUtils { @Nullable static AclLineMatchExpr fragmentOffsetsToAclLineMatchExpr( @Nullable IntegerSpace fragmentOffsets) { return Optional.ofNullable(fragmentOffsets) .map(IntegerSpace::getSubRanges) .map(k -> match(HeaderSpace.builder().setFragmentOffsets(k).build())) .orElse(null); } }
PacketHeaderConstraintsToAclLineMatchExprUtils { @Nullable static AclLineMatchExpr fragmentOffsetsToAclLineMatchExpr( @Nullable IntegerSpace fragmentOffsets) { return Optional.ofNullable(fragmentOffsets) .map(IntegerSpace::getSubRanges) .map(k -> match(HeaderSpace.builder().setFragmentOffsets(k).build())) .orElse(null); } private  PacketHeaderConstraintsToAclLineMatchExprUtils(); }
PacketHeaderConstraintsToAclLineMatchExprUtils { @Nullable static AclLineMatchExpr fragmentOffsetsToAclLineMatchExpr( @Nullable IntegerSpace fragmentOffsets) { return Optional.ofNullable(fragmentOffsets) .map(IntegerSpace::getSubRanges) .map(k -> match(HeaderSpace.builder().setFragmentOffsets(k).build())) .orElse(null); } private  PacketHeaderConstraintsToAclLineMatchExprUtils();  }
PacketHeaderConstraintsToAclLineMatchExprUtils { @Nullable static AclLineMatchExpr fragmentOffsetsToAclLineMatchExpr( @Nullable IntegerSpace fragmentOffsets) { return Optional.ofNullable(fragmentOffsets) .map(IntegerSpace::getSubRanges) .map(k -> match(HeaderSpace.builder().setFragmentOffsets(k).build())) .orElse(null); } private  PacketHeaderConstraintsToAclLineMatchExprUtils();   }