Class HostAndPort
- java.lang.Object
-
- zipkin2.storage.cassandra.internal.HostAndPort
-
public final class HostAndPort extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)static HostAndPortfromString(java.lang.String hostPort, int defaultPort)Constructs a host-port pair from the given string, defaulting to the indicated port if absentjava.lang.StringgetHost()Returns the unvalidated hostname or IP literalintgetPort()Returns the portinthashCode()java.lang.StringtoString()
-
-
-
Method Detail
-
getHost
public java.lang.String getHost()
Returns the unvalidated hostname or IP literal
-
getPort
public int getPort()
Returns the port
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
fromString
public static HostAndPort fromString(java.lang.String hostPort, int defaultPort)
Constructs a host-port pair from the given string, defaulting to the indicated port if absent
-
-