Package pcap.common.net
Class HostAndPort
java.lang.Object
pcap.common.net.HostAndPort
@Inclubating public final class HostAndPort extends Object
- Author:
- Ardika Rommy Sanjaya
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HostAndPort.Builder
Host builder class. -
Field Summary
Fields Modifier and Type Field Description static Pattern
DOMAIN_PATTERN
-
Method Summary
Modifier and Type Method Description static HostAndPort.Builder
builder()
InetAddress
hostAddress()
Get host address.String
hostAddress(String prefix)
Returns host address with given prefix.String
hostAddressWithPort()
Returns host address and port.String
hostAddressWithPort(String prefix)
Returns host address and port with given prefix.String
hostName()
Get host name.String
hostName(String prefix)
Returns host name with given prefix.String
hostNameWithPort()
Returns host name and port.String
hostNameWithPort(String prefix)
Returns host name and port with given prefix.int
port()
Get host port.String
toString()
-
Field Details
-
Method Details
-
hostName
Get host name.- Returns:
- returns host name of this
Host
object.
-
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
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
Returns host name and port.- Returns:
- returns host name and port of this
Host
object.
-
hostAddress
Returns host address with given prefix.- Parameters:
prefix
- prefix.- Returns:
- returns host address with given prefix of this
Host
object.
-
hostAddressWithPort
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
Returns host address and port.- Returns:
- returns host address and port of this
Host
object.
-
hostName
Returns host name with given prefix.- Parameters:
prefix
- prefix.- Returns:
- returns host name with given prefix of this
Host
object.
-
builder
-
toString
-