MCPcopy
hub / github.com/google/guava / hasPort

Method hasPort

guava/src/com/google/common/net/HostAndPort.java:101–103  ·  view source on GitHub ↗

Return true if this instance has a defined port.

()

Source from the content-addressed store, hash-verified

99
100 /** Return true if this instance has a defined port. */
101 public boolean hasPort() {
102 return port >= 0;
103 }
104
105 /**
106 * Get the current port number, failing if no port is defined.

Callers 10

getPortMethod · 0.95
getPortOrDefaultMethod · 0.95
fromPartsMethod · 0.95
fromHostMethod · 0.95
withDefaultPortMethod · 0.95
toStringMethod · 0.95
fromValidMethod · 0.95
checkFromStringCaseMethod · 0.95
testFromPartsMethod · 0.95
testFromHostMethod · 0.95

Calls

no outgoing calls

Tested by 3

checkFromStringCaseMethod · 0.76
testFromPartsMethod · 0.76
testFromHostMethod · 0.76