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