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 TypeMethodDescriptionboolean
int
hashCode()
static HostName
newHostName
(String string) Returns a newHostName
of the provided host name.Returns anInetAddress
of thisHost
.Methods inherited from class com.github.jh3nd3rs0n.jargyle.common.net.Host
newInstance, toString
-
Method Details
-
newHostName
Returns a newHostName
of the provided host name. AnIllegalArgumentException
is thrown if the provided host name is invalid.- Parameters:
string
- the provided host name- Returns:
- a new
HostName
of the provided host name
-
equals
-
hashCode
public int hashCode() -
toInetAddress
Description copied from class:Host
Returns anInetAddress
of thisHost
.- Specified by:
toInetAddress
in classHost
- Returns:
- an
InetAddress
of thisHost
- Throws:
UnknownHostException
- if the IP address cannot be determined from theString
representation of thisHost
-