@Test void parseConfStringShouldFailWhenZeroPort() { assertThatIllegalArgumentException() .isThrownBy(() -> Host.parseConfString("host:0")); }
public static Host parseConfString(String ipAndPort, int defaultPort) { return parse(ipAndPort, Optional.of(defaultPort)); }
Host { public static Host parseConfString(String ipAndPort, int defaultPort) { return parse(ipAndPort, Optional.of(defaultPort)); } }
Host { public static Host parseConfString(String ipAndPort, int defaultPort) { return parse(ipAndPort, Optional.of(defaultPort)); } @VisibleForTesting  Host(String hostName, int port); }
Host { public static Host parseConfString(String ipAndPort, int defaultPort) { return parse(ipAndPort, Optional.of(defaultPort)); } @VisibleForTesting  Host(String hostName, int port); static ImmutableList<Host> parseHosts(String hostsString); static ImmutableList<Host> parseHosts(String hostsString, int defaultPort); static Host from(String hostname, int port); static Host parseConfString(String ipAndPort, int defaultPort); static Host parseConfString(String ipAndPort); static Host parse(String ipAndPort, Optional<Integer> defaultPort); String getHostName(); int getPort(); @Override final int hashCode(); @Override final boolean equals(Object object); String asString(); @Override String toString(); }
Host { public static Host parseConfString(String ipAndPort, int defaultPort) { return parse(ipAndPort, Optional.of(defaultPort)); } @VisibleForTesting  Host(String hostName, int port); static ImmutableList<Host> parseHosts(String hostsString); static ImmutableList<Host> parseHosts(String hostsString, int defaultPort); static Host from(String hostname, int port); static Host parseConfString(String ipAndPort, int defaultPort); static Host parseConfString(String ipAndPort); static Host parse(String ipAndPort, Optional<Integer> defaultPort); String getHostName(); int getPort(); @Override final int hashCode(); @Override final boolean equals(Object object); String asString(); @Override String toString();  }