java.lang.Object
com.github.jh3nd3rs0n.jargyle.common.net.Host
com.github.jh3nd3rs0n.jargyle.common.net.HostName

public final class HostName extends Host
A name of a node of a network.
  • Method Details

    • newHostName

      public static HostName newHostName(String string)
      Returns a new HostName of the provided host name. An IllegalArgumentException 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

      public boolean equals(Object obj)
      Specified by:
      equals in class Host
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in class Host
    • toInetAddress

      public InetAddress toInetAddress() throws UnknownHostException
      Description copied from class: Host
      Returns an InetAddress of this Host.
      Specified by:
      toInetAddress in class Host
      Returns:
      an InetAddress of this Host
      Throws:
      UnknownHostException - if the IP address cannot be determined from the String representation of this Host