case class QueryString(params: Vector[(String, Option[String])])(implicit config: UriConfig = UriConfig.default) extends Product with Serializable
- Alphabetic
- By Inheritance
- QueryString
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new QueryString(params: Vector[(String, Option[String])])(implicit config: UriConfig = UriConfig.default)
Type Members
- type ParamToString = PartialFunction[(String, Option[String]), String]
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##(): Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def addParam(kv: (String, String)): QueryString
Adds a new Query String parameter key-value pair.
- def addParam(k: String): QueryString
Adds a new parameter key with no value, e.g.
Adds a new parameter key with no value, e.g.
?param
- returns
A new instance with the new parameter added
- def addParam(k: String, v: Option[String]): QueryString
Pairs with values, such as
("param", Some("value"))
, represent query params with values, i.e?param=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 aUriConfig(renderQuery = ExcludeNones)
, will cause pairs withNone
values not to be rendered- returns
A new instance with the new parameter added
- def addParam(k: String, v: String): QueryString
Adds a new parameter key-value pair.
Adds a new parameter key-value pair.
- returns
A new instance with the new parameter added
- def addParamOptionValue(kv: (String, Option[String])): QueryString
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
Using aUriConfig(renderQuery = ExcludeNones)
, will cause pairs withNone
values not to be renderedBy default, pairs without values, such as
("param", None)
, represent query params without values, i.e?param
- def addParams(kvs: Iterable[(String, String)]): QueryString
Adds all the specified key-value pairs as parameters to the query
- def addParams(kvs: (String, String)*): QueryString
Adds all the specified key-value pairs as parameters to the query
- def addParams(other: QueryString): QueryString
Adds all the specified key-value pairs as parameters to the query
- def addParamsOptionValues(kvs: (String, Option[String])*): QueryString
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 aUriConfig(renderQuery = ExcludeNones)
, will cause pairs withNone
values not to be rendered - def addParamsOptionValues(kvs: Iterable[(String, Option[String])]): QueryString
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 aUriConfig(renderQuery = ExcludeNones)
, will cause pairs withNone
values not to be rendered - final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def collect(f: PartialFunction[(String, Option[String]), (String, Option[String])]): QueryString
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
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def filter(f: ((String, Option[String])) => Boolean): QueryString
Filters out just the parameters for which the provided function holds true
- def filterNames(f: (String) => Boolean): QueryString
Filters out just the parameters for which the provided function holds true when applied to the parameter name
- def filterOptionValues(f: (Option[String]) => Boolean): QueryString
Filters out just the parameters for which the provided function holds true when applied to the parameter value
- def filterValues(f: (String) => Boolean): QueryString
Filters out just the parameters for which the provided function holds true when applied to the parameter value
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def flatMap(f: ((String, Option[String])) => Iterable[(String, Option[String])]): QueryString
Transforms each parameter by applying the specified Function
Transforms each parameter by applying the specified Function
- f
A function that returns a collection of Parameters when applied to each parameter
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def isEmpty: Boolean
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def map(f: PartialFunction[(String, Option[String]), (String, Option[String])]): QueryString
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
- def mapNames(f: (String) => String): QueryString
Transforms each parameter name by applying the specified Function
- def mapValues(f: (String) => String): QueryString
Transforms each parameter value by applying the specified Function
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def nonEmpty: Boolean
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def param(key: String): Option[String]
- lazy val paramMap: Map[String, Vector[String]]
- def params(key: String): Vector[Option[String]]
- val params: Vector[(String, Option[String])]
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- def removeAll(k: Iterable[String]): QueryString
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
- def removeAll(k: String*): QueryString
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
- def removeAll(k: String): QueryString
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
- def replaceAll(k: String, v: String): QueryString
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 QueryString with the result of the replace
- def replaceAll(k: String, v: Option[String]): QueryString
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.
If the value passed in is None, then all Query String parameters with the specified key are replaces with a valueless query param. E.g.
replaceParams("q", None)
would turn?q=1&q=2
into?q
- k
Key for the Query String parameter(s) to replace
- v
value to replace with
- returns
A new QueryString with the result of the replace
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- QueryString → AnyRef → Any
- def toStringRaw: String
Returns the query string with no encoding taking place (e.g.
Returns the query string with no encoding taking place (e.g. non ASCII characters will not be percent encoded)
- returns
String containing the raw query string for this Uri
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()