Class UriHost

java.lang.Object
io.helidon.common.uri.UriHost

public final class UriHost extends Object
Normalized host value.

The value never contains a port or IPv6 brackets. DNS names are normalized to lower-case ASCII, IPv4 literals to decimal dotted-quad form, and IPv6 literals to canonical compressed lower-case text form.

  • Method Details

    • create

      public static UriHost create(String host)
      Create a normalized host.
      Parameters:
      host - host text, without a port; IPv6 literals must not use authority brackets, use UriAuthority for authority text
      Returns:
      normalized host
      Throws:
      NullPointerException - in case the host is null
      IllegalArgumentException - in case the host is invalid
    • value

      public String value()
      Normalized host value.
      Returns:
      normalized host value
    • kind

      public UriHost.Kind kind()
      Host kind.
      Returns:
      host kind
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object