- Sort Score
- Num 10 results
- Language All
Results 1 - 3 of 3 for withDefaultPort (0.19 seconds)
-
android/guava/src/com/google/common/net/HostAndPort.java
/** * An immutable representation of a host and port. * * <p>Example usage: * * {@snippet : * HostAndPort hp = * HostAndPort.fromString("[2001:db8::1]") * .withDefaultPort(80) * .requireBracketsForIPv6(); * hp.getHost(); // returns "2001:db8::1" * hp.getPort(); // returns 80 * hp.toString(); // returns "[2001:db8::1]:80" * } *Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Feb 23 19:19:10 GMT 2026 - 11.1K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/net/HostAndPortTest.java
// Apply withDefaultPort(), yielding hp2. boolean badDefaultPort = defaultPort < 0 || defaultPort > 65535; HostAndPort hp2 = null; try { hp2 = hp.withDefaultPort(defaultPort); assertFalse(badDefaultPort); } catch (IllegalArgumentException e) { assertTrue(badDefaultPort); } // Check the pre-withDefaultPort() instance. if (expectHasExplicitPort) {Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 16 15:59:55 GMT 2026 - 9.7K bytes - Click Count (0) -
guava-tests/test/com/google/common/net/HostAndPortTest.java
// Apply withDefaultPort(), yielding hp2. boolean badDefaultPort = defaultPort < 0 || defaultPort > 65535; HostAndPort hp2 = null; try { hp2 = hp.withDefaultPort(defaultPort); assertFalse(badDefaultPort); } catch (IllegalArgumentException e) { assertTrue(badDefaultPort); } // Check the pre-withDefaultPort() instance. if (expectHasExplicitPort) {Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 16 15:59:55 GMT 2026 - 10K bytes - Click Count (0)