Class/Object

io.lemonlabs.uri

ProtocolRelativeUrl

Related Docs: object ProtocolRelativeUrl | package uri

Permalink

final case class ProtocolRelativeUrl(authority: Authority, path: AbsoluteOrEmptyPath, query: QueryString, fragment: Option[String])(implicit config: UriConfig = UriConfig.default) extends UrlWithAuthority with Product with Serializable

Represents absolute URLs, for example: //example.com

Linear Supertypes
UrlWithAuthority, Url, Uri, Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ProtocolRelativeUrl
  2. UrlWithAuthority
  3. Url
  4. Uri
  5. Serializable
  6. Serializable
  7. Product
  8. Equals
  9. AnyRef
  10. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ProtocolRelativeUrl(authority: Authority, path: AbsoluteOrEmptyPath, query: QueryString, fragment: Option[String])(implicit config: UriConfig = UriConfig.default)

    Permalink

Type Members

  1. type Self = ProtocolRelativeUrl

    Permalink
    Definition Classes
    ProtocolRelativeUrlUrlWithAuthorityUrlUri
  2. type SelfWithAuthority = Self

    Permalink
    Definition Classes
    UrlWithAuthorityUrl
  3. type SelfWithScheme = AbsoluteUrl

    Permalink
    Definition Classes
    ProtocolRelativeUrlUrlWithAuthorityUrlUri

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def addParam(kv: (String, String)): Self

    Permalink

    Adds a new Query String parameter key-value pair.

    Adds a new Query String parameter key-value pair.

    kv

    name-value pair for the query parameter to be added

    returns

    A new Url with the new Query String parameter

    Definition Classes
    Url
  5. def addParam(name: String, value: String): Self

    Permalink

    Adds a new Query String parameter key-value pair.

    Adds a new Query String parameter key-value pair.

    name

    name of the parameter

    value

    value for the parameter

    returns

    A new Url with the new Query String parameter

    Definition Classes
    Url
  6. def addParam(name: String, value: Option[String]): Self

    Permalink

    Adds a new Query String parameter key-value pair.

    Adds a new Query String parameter key-value pair.

    Pairs with values, such as Some("value"), represent query params with values, i.e ?param=value

    By default, pairs without values, i.e None, represent query params without values, i.e ?param Using a UriConfig(renderQuery = ExcludeNones), will cause pairs with None values not to be rendered

    name

    name of the parameter

    value

    value for the parameter

    returns

    A new Url with the new Query String parameter

    Definition Classes
    Url
  7. def addParamOptionValue(kv: (String, Option[String])): Self

    Permalink

    Adds a new Query String parameter key-value pair.

    Adds a new Query String parameter key-value pair.

    Pairs with values, such as ("param", Some("value")), represent query params with values, i.e ?param=value

    By default, pairs without values, such as ("param", None), represent query params without values, i.e ?param Using a UriConfig(renderQuery = ExcludeNones), will cause pairs with None values not to be rendered

    kv

    name-value pair for the query parameter to be added

    returns

    A new Url with the new Query String parameter

    Definition Classes
    Url
  8. def addParams(kvs: Iterable[(String, String)]): Self

    Permalink

    Adds all the specified key-value pairs as parameters to the query

    Adds all the specified key-value pairs as parameters to the query

    kvs

    A list of key-value pairs to add as query parameters

    returns

    A new Url with the new Query String parameters

    Definition Classes
    Url
  9. def addParams(kvs: (String, String)*): Self

    Permalink

    Adds all the specified key-value pairs as parameters to the query

    Adds all the specified key-value pairs as parameters to the query

    kvs

    A list of key-value pairs to add as query parameters

    returns

    A new Url with the new Query String parameters

    Definition Classes
    Url
  10. def addParamsOptionValues(kvs: (String, Option[String])*): Self

    Permalink

    Adds all the specified key-value pairs as parameters to the query

    Adds all the specified key-value pairs as parameters to the query

    Pairs with values, such as ("param", Some("value")), represent query params with values, i.e ?param=value

    By default, pairs without values, such as ("param", None), represent query params without values, i.e ?param Using a UriConfig(renderQuery = ExcludeNones), will cause pairs with None values not to be rendered

    kvs

    A list of key-value pairs to add as query parameters

    returns

    A new Url with the new Query String parameters

    Definition Classes
    Url
  11. def addParamsOptionValues(kvs: Iterable[(String, Option[String])]): Self

    Permalink

    Adds all the specified key-value pairs as parameters to the query

    Adds all the specified key-value pairs as parameters to the query

    Pairs with values, such as ("param", Some("value")), represent query params with values, i.e ?param=value

    By default, pairs without values, such as ("param", None), represent query params without values, i.e ?param Using a UriConfig(renderQuery = ExcludeNones), will cause pairs with None values not to be rendered

    kvs

    A list of key-value pairs to add as query parameters

    returns

    A new Url with the new Query String parameters

    Definition Classes
    Url
  12. def addPathPart(part: String): Self

    Permalink
    Definition Classes
    Url
  13. def addPathParts(parts: String*): Self

    Permalink
    Definition Classes
    Url
  14. def addPathParts(parts: Iterable[String]): Self

    Permalink
    Definition Classes
    Url
  15. def apexDomain: Option[String]

    Permalink

    Returns the apex domain for this URL.

    Returns the apex domain for this URL.

    The apex domain is constructed from the public suffix for this URL's host prepended with the immediately preceding dot segment.

    Examples include: example.com for www.example.com example.co.uk for www.example.co.uk

    returns

    the apex domain for this URL

    Definition Classes
    Url
  16. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  17. val authority: Authority

    Permalink
    Definition Classes
    ProtocolRelativeUrlUrlWithAuthority
  18. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  19. def collectQuery(f: PartialFunction[(String, Option[String]), (String, Option[String])]): Self

    Permalink

    Transforms the Query String by applying the specified PartialFunction to each Query String Parameter

    Transforms the Query String by applying the specified PartialFunction to each Query String Parameter

    Parameters not defined in the PartialFunction will be removed.

    f

    A function that returns a new Parameter when applied to each Parameter

    Definition Classes
    Url
  20. implicit val config: UriConfig

    Permalink
    Definition Classes
    ProtocolRelativeUrlUri
  21. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  22. def filterQuery(f: ((String, Option[String])) ⇒ Boolean): Self

    Permalink

    Removes any Query String Parameters that return false when applied to the given Function

    Removes any Query String Parameters that return false when applied to the given Function

    Definition Classes
    Url
  23. def filterQueryNames(f: (String) ⇒ Boolean): Self

    Permalink

    Removes any Query String Parameters that return false when their name is applied to the given Function

    Removes any Query String Parameters that return false when their name is applied to the given Function

    Definition Classes
    Url
  24. def filterQueryValues(f: (String) ⇒ Boolean): Self

    Permalink

    Removes any Query String Parameters that return false when their value is applied to the given Function

    Removes any Query String Parameters that return false when their value is applied to the given Function

    Definition Classes
    Url
  25. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  26. def flatMapQuery(f: ((String, Option[String])) ⇒ Iterable[(String, Option[String])]): Self

    Permalink

    Transforms the Query String by applying the specified Function to each Query String Parameter

    Transforms the Query String by applying the specified Function to each Query String Parameter

    f

    A function that returns a collection of Parameters when applied to each parameter

    Definition Classes
    Url
  27. val fragment: Option[String]

    Permalink
    Definition Classes
    ProtocolRelativeUrlUrl
  28. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  29. def host: Host

    Permalink
    Definition Classes
    UrlWithAuthority
  30. def hostOption: Option[Host]

    Permalink
    Definition Classes
    UrlWithAuthorityUrl
  31. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  32. def longestSubdomain: Option[String]

    Permalink

    Returns the longest subdomain for this URL's host.

    Returns the longest subdomain for this URL's host. E.g. for http://a.b.c.example.com returns a.b.c.example

    returns

    the longest subdomain for this URL's host

    Definition Classes
    UrlWithAuthorityUrl
  33. def mapQuery(f: PartialFunction[(String, Option[String]), (String, Option[String])]): Self

    Permalink

    Transforms the Query String by applying the specified PartialFunction to each Query String Parameter

    Transforms the Query String by applying the specified PartialFunction to each Query String Parameter

    Parameters not defined in the PartialFunction will be left as-is.

    f

    A function that returns a new Parameter when applied to each Parameter

    Definition Classes
    Url
  34. def mapQueryNames(f: (String) ⇒ String): Self

    Permalink

    Transforms the Query String by applying the specified Function to each Query String Parameter name

    Transforms the Query String by applying the specified Function to each Query String Parameter name

    f

    A function that returns a new Parameter name when applied to each Parameter name

    Definition Classes
    Url
  35. def mapQueryValues(f: (String) ⇒ String): Self

    Permalink

    Transforms the Query String by applying the specified Function to each Query String Parameter value

    Transforms the Query String by applying the specified Function to each Query String Parameter value

    f

    A function that returns a new Parameter value when applied to each Parameter value

    Definition Classes
    Url
  36. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  37. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  38. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  39. def password: Option[String]

    Permalink
    Definition Classes
    UrlWithAuthorityUrl
  40. val path: AbsoluteOrEmptyPath

    Permalink
    Definition Classes
    ProtocolRelativeUrlUrlUri
  41. def port: Option[Int]

    Permalink
    Definition Classes
    UrlWithAuthorityUrl
  42. def publicSuffix: Option[String]

    Permalink

    Returns the longest public suffix for the host in this URI.

    Returns the longest public suffix for the host in this URI. Examples include: com for www.example.com co.uk for www.example.co.uk

    returns

    the longest public suffix for the host in this URI

    Definition Classes
    UrlWithAuthorityUrl
  43. def publicSuffixes: Vector[String]

    Permalink

    Returns all longest public suffixes for the host in this URI.

    Returns all longest public suffixes for the host in this URI. Examples include: com for www.example.com co.uk and uk for www.example.co.uk

    returns

    all public suffixes for the host in this URI

    Definition Classes
    UrlWithAuthorityUrl
  44. val query: QueryString

    Permalink
    Definition Classes
    ProtocolRelativeUrlUrl
  45. def removeParams(k: Iterable[String]): Self

    Permalink

    Removes all Query String parameters with a name in the specified list

    Removes all Query String parameters with a name in the specified list

    k

    Names of Query String parameter(s) to remove

    Definition Classes
    Url
  46. def removeParams(k: String*): Self

    Permalink

    Removes all Query String parameters with a name in the specified list

    Removes all Query String parameters with a name in the specified list

    k

    Names of Query String parameter(s) to remove

    Definition Classes
    Url
  47. def removeParams(k: String): Self

    Permalink

    Removes all Query String parameters with the specified key

    Removes all Query String parameters with the specified key

    k

    Key for the Query String parameter(s) to remove

    Definition Classes
    Url
  48. def removeQueryString(): Self

    Permalink

    Removes all Query String parameters

    Removes all Query String parameters

    Definition Classes
    Url
  49. def replaceParams(k: String, v: String): Self

    Permalink

    Replaces the all existing Query String parameters with the specified key with a single Query String parameter with the specified value.

    Replaces the all existing Query String parameters with the specified key with a single Query String parameter with the specified value.

    k

    Key for the Query String parameter(s) to replace

    v

    value to replace with

    returns

    A new Uri with the result of the replace

    Definition Classes
    Url
  50. def replaceParams(k: String, v: Option[String]): Self

    Permalink

    Replaces the all existing Query String parameters with the specified key with a single Query String parameter with the specified value.

    Replaces the all existing Query String parameters with the specified key with a single Query String parameter with the specified value.

    Pairs with values, such as ("param", Some("value")), represent query params with values, i.e ?param=value

    By default, pairs without values, such as ("param", None), represent query params without values, i.e ?param Using a UriConfig(renderQuery = ExcludeNones), will cause pairs with None values not to be rendered

    k

    Key for the Query String parameter(s) to replace

    v

    value to replace with

    returns

    A new Uri with the result of the replace

    Definition Classes
    Url
  51. def schemeOption: Option[String]

    Permalink
    Definition Classes
    ProtocolRelativeUrlUri
  52. def self: ProtocolRelativeUrl

    Permalink
    Definition Classes
    ProtocolRelativeUrlUri
  53. def shortestSubdomain: Option[String]

    Permalink

    Returns the shortest subdomain for this URL's host.

    Returns the shortest subdomain for this URL's host. E.g. for http://a.b.c.example.com returns a

    returns

    the shortest subdomain for this URL's host

    Definition Classes
    UrlWithAuthorityUrl
  54. def subdomain: Option[String]

    Permalink

    Returns the second largest subdomain for this URL's host.

    Returns the second largest subdomain for this URL's host.

    E.g. for http://a.b.c.example.com returns a.b.c

    Note: In the event there is only one subdomain (i.e. the host is the apex domain), this method returns None. E.g. This method will return None for http://example.com.

    returns

    the second largest subdomain for this URL's host

    Definition Classes
    UrlWithAuthorityUrl
  55. def subdomains: Vector[String]

    Permalink

    Returns all subdomains for this URL's host.

    Returns all subdomains for this URL's host. E.g. for http://a.b.c.example.com returns a, a.b, a.b.c and a.b.c.example

    returns

    all subdomains for this URL's host

    Definition Classes
    UrlWithAuthorityUrl
  56. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  57. def toAbsoluteUrl: AbsoluteUrl

    Permalink
    Definition Classes
    Url
  58. def toJavaURI: URI

    Permalink

    Converts to a java.net.URI

    Converts to a java.net.URI

    This involves a toString and URI.parse because the specific java.net.URI constructors do not deal properly with encoded elements

    returns

    a java.net.URI matching this io.lemonlabs.uri.Uri

    Definition Classes
    Uri
  59. def toProtocolRelativeUrl: ProtocolRelativeUrl

    Permalink
    Definition Classes
    Url
  60. def toRelativeUrl: RelativeUrl

    Permalink
    Definition Classes
    Url
  61. def toString(): String

    Permalink
    Definition Classes
    Uri → AnyRef → Any
  62. def toStringPunycode: String

    Permalink

    returns

    the URL as a String. If the URI has a domain name for a host, any unicode characters will be returned in ASCII Compatible Encoding (ACE), as defined by the ToASCII operation of RFC 3490.

    Definition Classes
    UrlWithAuthorityUrl
  63. def toStringRaw: String

    Permalink

    Returns the path with no encoders taking place (e.g.

    Returns the path with no encoders taking place (e.g. non ASCII characters will not be percent encoded)

    returns

    String containing the raw path for this Uri

    Definition Classes
    Uri
  64. def toUrl: Url

    Permalink
    Definition Classes
    UrlUri
  65. def toUrn: Urn

    Permalink
    Definition Classes
    UrlUri
  66. def user: Option[String]

    Permalink
    Definition Classes
    UrlWithAuthorityUrl
  67. def userInfo: UserInfo

    Permalink
    Definition Classes
    UrlWithAuthority
  68. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  69. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  70. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  71. def withAuthority(authority: Authority): ProtocolRelativeUrl

    Permalink

    Copies this Url but with the authority set as the given value.

    Copies this Url but with the authority set as the given value.

    authority

    the authority host to set

    returns

    a new Url with the specified authority

    Definition Classes
    ProtocolRelativeUrlUrl
  72. def withFragment(fragment: Option[String]): ProtocolRelativeUrl

    Permalink

    Copies this Url but with the fragment set as the given value.

    Copies this Url but with the fragment set as the given value.

    fragment

    the new fragment to set

    returns

    a new Url with the specified fragment

    Definition Classes
    ProtocolRelativeUrlUrl
  73. def withFragment(fragment: String): Self

    Permalink

    Copies this Url but with the fragment set as the given value.

    Copies this Url but with the fragment set as the given value.

    fragment

    the new fragment to set

    returns

    a new Url with the specified fragment

    Definition Classes
    Url
  74. def withHost(host: Host): Self

    Permalink

    Copies this Url but with the host set as the given value.

    Copies this Url but with the host set as the given value.

    host

    the new host to set

    returns

    a new Url with the specified host

    Definition Classes
    UrlWithAuthorityUrl
  75. def withHost(host: String): SelfWithAuthority

    Permalink

    Copies this Url but with the host set as the given value.

    Copies this Url but with the host set as the given value.

    host

    the new host to set

    returns

    a new Url with the specified host

    Definition Classes
    Url
  76. def withPassword(password: String): Self

    Permalink

    Copies this Url but with the password set as the given value.

    Copies this Url but with the password set as the given value.

    password

    the new password to set

    returns

    a new Url with the specified password

    Definition Classes
    UrlWithAuthority
  77. def withPath(path: UrlPath): ProtocolRelativeUrl

    Permalink

    Copies this Url but with the path set as the given value.

    Copies this Url but with the path set as the given value.

    If the specified path is non empty *and* doesn't have a leading slash, one will be added, as per RFC 3986: When authority is present, the path must either be empty or begin with a slash ("/") character.

    path

    the new path to set

    returns

    a new Url with the specified path

    Definition Classes
    ProtocolRelativeUrlUrl
  78. def withPort(port: Int): Self

    Permalink

    Copies this Url but with the port set as the given value.

    Copies this Url but with the port set as the given value.

    port

    the new port to set

    returns

    a new Url with the specified port

    Definition Classes
    UrlWithAuthority
  79. def withQueryString(query: QueryString): ProtocolRelativeUrl

    Permalink

    Copies this Url but with the query set as the given value.

    Copies this Url but with the query set as the given value.

    query

    the new QueryString to set

    returns

    a new Url with the specified query

    Definition Classes
    ProtocolRelativeUrlUrl
  80. def withQueryString(params: (String, String)*): Self

    Permalink

    Replaces the all existing Query String parameters with a new set of query params

    Replaces the all existing Query String parameters with a new set of query params

    Definition Classes
    Url
  81. def withQueryStringOptionValues(params: (String, Option[String])*): Self

    Permalink

    Replaces the all existing Query String parameters with a new set of query params

    Replaces the all existing Query String parameters with a new set of query params

    Pairs with values, such as ("k", Some("v")), represent query params with values, i.e ?k=v Pairs without values, such as ("k", None), represent query params without values, i.e ?k

    Definition Classes
    Url
  82. def withScheme(scheme: String): AbsoluteUrl

    Permalink

    Copies this Uri but with the scheme set as the given value.

    Copies this Uri but with the scheme set as the given value.

    scheme

    the new scheme to set

    returns

    a new Uri with the specified scheme

    Definition Classes
    ProtocolRelativeUrlUri
  83. def withUser(user: String): Self

    Permalink

    Copies this Url but with the user set as the given value.

    Copies this Url but with the user set as the given value.

    user

    the new user to set

    returns

    a new Url with the specified user

    Definition Classes
    UrlWithAuthority

Inherited from UrlWithAuthority

Inherited from Url

Inherited from Uri

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped