Package com.norconex.commons.lang.net
Class Host
java.lang.Object
com.norconex.commons.lang.net.Host
- All Implemented Interfaces:
Serializable
Holds a host name and port.
- Since:
- 2.0.0
- See Also:
-
Constructor Details
-
Host
-
-
Method Details
-
getName
-
getPort
public int getPort() -
isSet
public boolean isSet() -
withName
-
withPort
-
toInetSocketAddress
Converts this host to anInetSocketAddressif the name is set, otherwise returnsnull. The port must be greater or equal to zero.- Returns:
- socket address or
null
-
toString
-
equals
-
hashCode
public int hashCode()
-