MCPcopy Create free account
hub / github.com/antlr/codebuff / getPortOrDefault

Method getPortOrDefault

output/java_guava/1.4.17/HostAndPort.java:123–125  ·  view source on GitHub ↗

Returns the current port number, with a default if no port is defined.

(int defaultPort)

Source from the content-addressed store, hash-verified

121
122
123 public int getPortOrDefault(int defaultPort) {
124 return hasPort() ? port : defaultPort;
125 }
126
127 /**
128 * Build a HostAndPort instance from separate host and port values.

Callers

nothing calls this directly

Calls 1

hasPortMethod · 0.95

Tested by

no test coverage detected