@Test public void testToString() { assertThat(UdpApplication.ALL.toString(), equalTo("udp")); assertThat(new UdpApplication(80).toString(), equalTo("udp/80")); assertThat( new UdpApplication(ImmutableList.of(new SubRange(0, 80))).toString(), equalTo("udp/0-80")); assertThat( new UdpApplication(ImmutableList.of(SubRange.singleton(443), new SubRange(0, 80))) .toString(), equalTo("udp/443,0-80")); }
@Override public String toString() { if (ALL.equals(this)) { return "udp"; } return "udp/" + stringifySubRanges(_ports); }
UdpApplication extends PortsApplication { @Override public String toString() { if (ALL.equals(this)) { return "udp"; } return "udp/" + stringifySubRanges(_ports); } }
UdpApplication extends PortsApplication { @Override public String toString() { if (ALL.equals(this)) { return "udp"; } return "udp/" + stringifySubRanges(_ports); } UdpApplication(List<SubRange> ports);  UdpApplication(int port); }
UdpApplication extends PortsApplication { @Override public String toString() { if (ALL.equals(this)) { return "udp"; } return "udp/" + stringifySubRanges(_ports); } UdpApplication(List<SubRange> ports);  UdpApplication(int port); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); @Override T accept(ApplicationVisitor<T> visitor); }
UdpApplication extends PortsApplication { @Override public String toString() { if (ALL.equals(this)) { return "udp"; } return "udp/" + stringifySubRanges(_ports); } UdpApplication(List<SubRange> ports);  UdpApplication(int port); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); @Override T accept(ApplicationVisitor<T> visitor); static final UdpApplication ALL; }