@Test public void testToString() { assertThat( new IcmpTypeCodesApplication(0, ImmutableList.of(ALL_CODES)).toString(), equalTo("icmp/0")); assertThat( new IcmpTypeCodesApplication(0, ImmutableList.of(new SubRange(0, 8))).toString(), equalTo("icmp/0/0-8")); assertThat( new IcmpTypeCodesApplication(0, ImmutableList.of(SubRange.singleton(4), new SubRange(0, 8))) .toString(), equalTo("icmp/0/4,0-8")); }
@Override public String toString() { if (_codes.equals(ImmutableList.of(ALL_CODES))) { return "icmp/" + _type; } return String.format("icmp/%d/%s", _type, stringifySubRanges(_codes)); }
IcmpTypeCodesApplication extends IcmpApplication { @Override public String toString() { if (_codes.equals(ImmutableList.of(ALL_CODES))) { return "icmp/" + _type; } return String.format("icmp/%d/%s", _type, stringifySubRanges(_codes)); } }
IcmpTypeCodesApplication extends IcmpApplication { @Override public String toString() { if (_codes.equals(ImmutableList.of(ALL_CODES))) { return "icmp/" + _type; } return String.format("icmp/%d/%s", _type, stringifySubRanges(_codes)); } IcmpTypeCodesApplication(int type, int code);  IcmpTypeCodesApplication(int type, List<SubRange> codes); }
IcmpTypeCodesApplication extends IcmpApplication { @Override public String toString() { if (_codes.equals(ImmutableList.of(ALL_CODES))) { return "icmp/" + _type; } return String.format("icmp/%d/%s", _type, stringifySubRanges(_codes)); } 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 String toString() { if (_codes.equals(ImmutableList.of(ALL_CODES))) { return "icmp/" + _type; } return String.format("icmp/%d/%s", _type, stringifySubRanges(_codes)); } 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; }