Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 3 of 3 for withDefaultPort (0.22 seconds)

  1. 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)
  2. 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)
  3. 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)
Back to Top