Java com.google.common.net HostAndPort fields, constructors, methods, implement or subclass

Example usage for Java com.google.common.net HostAndPort fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for com.google.common.net HostAndPort.

The text is from its open source code.

Method

booleanequals(@Nullable Object other)
HostAndPortfromHost(String host)
Build a HostAndPort instance from a host only.
HostAndPortfromParts(String host, int port)
Build a HostAndPort instance from separate host and port values.
HostAndPortfromString(String hostPortString)
Split a freeform string into a host and port, without strict validation.
StringgetHostText()
Returns the portion of this HostAndPort instance that should represent the hostname or IPv4/IPv6 literal.
intgetPort()
Get the current port number, failing if no port is defined.
intgetPortOrDefault(int defaultPort)
Returns the current port number, with a default if no port is defined.
booleanhasPort()
Return true if this instance has a defined port.
HostAndPortrequireBracketsForIPv6()
Generate an error if the host might be a non-bracketed IPv6 literal.
StringtoString()
Rebuild the host:port string, including brackets if necessary.
HostAndPortwithDefaultPort(int defaultPort)
Provide a default port if the parsed string contained only a host.