Class HostName
java.lang.Object
com.github.jh3nd3rs0n.jargyle.common.net.Host
com.github.jh3nd3rs0n.jargyle.common.net.HostName
A name of a node of a network.
-
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()static HostNamenewHostName(String string) Returns a newHostNameof the provided host name.Returns anInetAddressof thisHost.Methods inherited from class com.github.jh3nd3rs0n.jargyle.common.net.Host
newInstance, toString
-
Method Details
-
newHostName
Returns a newHostNameof the provided host name. AnIllegalArgumentExceptionis thrown if the provided host name is invalid.- Parameters:
string- the provided host name- Returns:
- a new
HostNameof the provided host name
-
equals
-
hashCode
public int hashCode() -
toInetAddress
Description copied from class:HostReturns anInetAddressof thisHost.- Specified by:
toInetAddressin classHost- Returns:
- an
InetAddressof thisHost - Throws:
UnknownHostException- if the IP address cannot be determined from theStringrepresentation of thisHost
-