@Test public void testTcpFlagsToAclLineMatchExpr() { assertEquals( PacketHeaderConstraintsToAclLineMatchExprUtils.tcpFlagsToAclLineMatchExpr( ImmutableSet.of( TcpFlagsMatchConditions.builder() .setTcpFlags(TcpFlags.builder().setSyn(true).build()) .build())), match( HeaderSpace.builder() .setTcpFlags( ImmutableSet.of( TcpFlagsMatchConditions.builder() .setTcpFlags(TcpFlags.builder().setSyn(true).build()) .build())) .build())); }
@Nullable static AclLineMatchExpr tcpFlagsToAclLineMatchExpr( @Nullable Set<TcpFlagsMatchConditions> tcpFlags) { return Optional.ofNullable(tcpFlags) .map(k -> match(HeaderSpace.builder().setTcpFlags(k).build())) .orElse(null); }
PacketHeaderConstraintsToAclLineMatchExprUtils { @Nullable static AclLineMatchExpr tcpFlagsToAclLineMatchExpr( @Nullable Set<TcpFlagsMatchConditions> tcpFlags) { return Optional.ofNullable(tcpFlags) .map(k -> match(HeaderSpace.builder().setTcpFlags(k).build())) .orElse(null); } }
PacketHeaderConstraintsToAclLineMatchExprUtils { @Nullable static AclLineMatchExpr tcpFlagsToAclLineMatchExpr( @Nullable Set<TcpFlagsMatchConditions> tcpFlags) { return Optional.ofNullable(tcpFlags) .map(k -> match(HeaderSpace.builder().setTcpFlags(k).build())) .orElse(null); } private  PacketHeaderConstraintsToAclLineMatchExprUtils(); }
PacketHeaderConstraintsToAclLineMatchExprUtils { @Nullable static AclLineMatchExpr tcpFlagsToAclLineMatchExpr( @Nullable Set<TcpFlagsMatchConditions> tcpFlags) { return Optional.ofNullable(tcpFlags) .map(k -> match(HeaderSpace.builder().setTcpFlags(k).build())) .orElse(null); } private  PacketHeaderConstraintsToAclLineMatchExprUtils();  }
PacketHeaderConstraintsToAclLineMatchExprUtils { @Nullable static AclLineMatchExpr tcpFlagsToAclLineMatchExpr( @Nullable Set<TcpFlagsMatchConditions> tcpFlags) { return Optional.ofNullable(tcpFlags) .map(k -> match(HeaderSpace.builder().setTcpFlags(k).build())) .orElse(null); } private  PacketHeaderConstraintsToAclLineMatchExprUtils();   }