Class HostAndPort

java.lang.Object
pcap.common.net.HostAndPort

@Inclubating
public final class HostAndPort
extends Object
Author:
Ardika Rommy Sanjaya
  • Field Details

  • Method Details

    • hostName

      public String hostName()
      Get host name.
      Returns:
      returns host name of this Host object.
    • hostAddress

      public InetAddress hostAddress()
      Get host address.
      Returns:
      returns host address of this Host object.
    • port

      public int port()
      Get host port.
      Returns:
      returns host port of this Host object.
    • hostNameWithPort

      public String hostNameWithPort​(String prefix)
      Returns host name and port with given prefix.
      Parameters:
      prefix - prefix.
      Returns:
      returns host name and port with given prefix of this Host object.
    • hostNameWithPort

      public String hostNameWithPort()
      Returns host name and port.
      Returns:
      returns host name and port of this Host object.
    • hostAddress

      public String hostAddress​(String prefix)
      Returns host address with given prefix.
      Parameters:
      prefix - prefix.
      Returns:
      returns host address with given prefix of this Host object.
    • hostAddressWithPort

      public String hostAddressWithPort​(String prefix)
      Returns host address and port with given prefix.
      Parameters:
      prefix - prefix.
      Returns:
      returns host address and port with given prefix of this Host object.
    • hostAddressWithPort

      public String hostAddressWithPort()
      Returns host address and port.
      Returns:
      returns host address and port of this Host object.
    • hostName

      public String hostName​(String prefix)
      Returns host name with given prefix.
      Parameters:
      prefix - prefix.
      Returns:
      returns host name with given prefix of this Host object.
    • builder

      public static HostAndPort.Builder builder()
    • toString

      public String toString()
      Overrides:
      toString in class Object