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