@Test public void testApplicationsToAclLineMatchExpr() { assertEquals( PacketHeaderConstraintsToAclLineMatchExprUtils.applicationsToAclLineMatchExpr( ImmutableSet.of(Protocol.SSH.toApplication(), Protocol.DNS.toApplication())), or( match( HeaderSpace.builder() .setIpProtocols(IpProtocol.TCP) .setDstPorts(SubRange.singleton(22)) .build()), match( HeaderSpace.builder() .setIpProtocols(IpProtocol.UDP) .setDstPorts(SubRange.singleton(53)) .build()))); }
@Nullable static AclLineMatchExpr applicationsToAclLineMatchExpr(@Nullable Set<Application> applications) { return applications == null ? null : or( applications.stream() .map(Application::toAclLineMatchExpr) .collect(ImmutableList.toImmutableList())); }
PacketHeaderConstraintsToAclLineMatchExprUtils { @Nullable static AclLineMatchExpr applicationsToAclLineMatchExpr(@Nullable Set<Application> applications) { return applications == null ? null : or( applications.stream() .map(Application::toAclLineMatchExpr) .collect(ImmutableList.toImmutableList())); } }
PacketHeaderConstraintsToAclLineMatchExprUtils { @Nullable static AclLineMatchExpr applicationsToAclLineMatchExpr(@Nullable Set<Application> applications) { return applications == null ? null : or( applications.stream() .map(Application::toAclLineMatchExpr) .collect(ImmutableList.toImmutableList())); } private  PacketHeaderConstraintsToAclLineMatchExprUtils(); }
PacketHeaderConstraintsToAclLineMatchExprUtils { @Nullable static AclLineMatchExpr applicationsToAclLineMatchExpr(@Nullable Set<Application> applications) { return applications == null ? null : or( applications.stream() .map(Application::toAclLineMatchExpr) .collect(ImmutableList.toImmutableList())); } private  PacketHeaderConstraintsToAclLineMatchExprUtils();  }
PacketHeaderConstraintsToAclLineMatchExprUtils { @Nullable static AclLineMatchExpr applicationsToAclLineMatchExpr(@Nullable Set<Application> applications) { return applications == null ? null : or( applications.stream() .map(Application::toAclLineMatchExpr) .collect(ImmutableList.toImmutableList())); } private  PacketHeaderConstraintsToAclLineMatchExprUtils();   }