@Test public void testToAclLineMatchExpr() { assertEquals( new IcmpTypeCodesApplication(0, ImmutableList.of(new SubRange(1, 10), new SubRange(20, 30))) .toAclLineMatchExpr(), new MatchHeaderSpace( HeaderSpace.builder() .setIpProtocols(IpProtocol.ICMP) .setIcmpTypes(0) .setIcmpCodes(ImmutableList.of(new SubRange(1, 10), new SubRange(20, 30))) .build())); }
@Override public AclLineMatchExpr toAclLineMatchExpr() { return new MatchHeaderSpace( HeaderSpace.builder() .setIpProtocols(ICMP) .setIcmpTypes(_type) .setIcmpCodes(_codes) .build()); }
IcmpTypeCodesApplication extends IcmpApplication { @Override public AclLineMatchExpr toAclLineMatchExpr() { return new MatchHeaderSpace( HeaderSpace.builder() .setIpProtocols(ICMP) .setIcmpTypes(_type) .setIcmpCodes(_codes) .build()); } }
IcmpTypeCodesApplication extends IcmpApplication { @Override public AclLineMatchExpr toAclLineMatchExpr() { return new MatchHeaderSpace( HeaderSpace.builder() .setIpProtocols(ICMP) .setIcmpTypes(_type) .setIcmpCodes(_codes) .build()); } IcmpTypeCodesApplication(int type, int code);  IcmpTypeCodesApplication(int type, List<SubRange> codes); }
IcmpTypeCodesApplication extends IcmpApplication { @Override public AclLineMatchExpr toAclLineMatchExpr() { return new MatchHeaderSpace( HeaderSpace.builder() .setIpProtocols(ICMP) .setIcmpTypes(_type) .setIcmpCodes(_codes) .build()); } IcmpTypeCodesApplication(int type, int code);  IcmpTypeCodesApplication(int type, List<SubRange> codes); int getType(); @Nonnull List<SubRange> getCodes(); static boolean isValidTypeCode(int type, int code); @Override AclLineMatchExpr toAclLineMatchExpr(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); @Override T accept(ApplicationVisitor<T> visitor); }
IcmpTypeCodesApplication extends IcmpApplication { @Override public AclLineMatchExpr toAclLineMatchExpr() { return new MatchHeaderSpace( HeaderSpace.builder() .setIpProtocols(ICMP) .setIcmpTypes(_type) .setIcmpCodes(_codes) .build()); } IcmpTypeCodesApplication(int type, int code);  IcmpTypeCodesApplication(int type, List<SubRange> codes); int getType(); @Nonnull List<SubRange> getCodes(); static boolean isValidTypeCode(int type, int code); @Override AclLineMatchExpr toAclLineMatchExpr(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); @Override T accept(ApplicationVisitor<T> visitor); static final SubRange ALL_CODES; static final Map<Integer, SubRange> VALID_TYPE_CODES; }