Class/Object

fm.common

QueryParams

Related Docs: object QueryParams | package common

Permalink

final class QueryParams extends AnyRef

Represents immutable query parameters from a query string (e.g. "?foo=bar&asd=qwe").

This class distinguishes between 3 different types of values for a key:

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. QueryParams
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

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 add(other: QueryParams): QueryParams

    Permalink

    Add multiple key/value pairs

    Add multiple key/value pairs

    returns

    A new QueryParams instance with the added key/value pair

  5. def add(kvPairs: (String, String)*): QueryParams

    Permalink

    Add multiple key/value pairs

    Add multiple key/value pairs

    returns

    A new QueryParams instance with the added key/value pair

  6. def add(key: String, value: String): QueryParams

    Permalink

    Add a key/value pair

    Add a key/value pair

    returns

    A new QueryParams instance with the added key/value pair

  7. def allKeys: Set[String]

    Permalink

    The unique set of keys with or without values

  8. def apply(idx: Int): (String, String)

    Permalink
  9. def apply(key: String): Seq[String]

    Permalink

    Returns all values for the given key or throws a NoSuchElementException if the key doesn't exists.

    Returns all values for the given key or throws a NoSuchElementException if the key doesn't exists. An Empty Seq is returned if the key exists but has no non-null values.

  10. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  11. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @throws( ... )
  12. def contains(elem: (String, String)): Boolean

    Permalink

    Check for key/value pair existence

  13. def contains(key: String, value: String): Boolean

    Permalink

    Check for key/value pair existence

  14. def contains(key: String): Boolean

    Permalink

    Check for key existence

  15. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  16. def equals(obj: Any): Boolean

    Permalink
    Definition Classes
    QueryParams → AnyRef → Any
  17. def filter(f: ((String, String)) ⇒ Boolean): QueryParams

    Permalink
  18. def filterKeys(f: (String) ⇒ Boolean): QueryParams

    Permalink
  19. def filterNot(f: ((String, String)) ⇒ Boolean): QueryParams

    Permalink
  20. def filterValues(f: (String) ⇒ Boolean): QueryParams

    Permalink
  21. def first(key: String): String

    Permalink

    Returns the first non-null value for the given key or throws a NoSuchElementException if none exists.

  22. def firstNonBlank(key: String): String

    Permalink

    Returns the first non-blank value for the given key or throws a NoSuchElementException if none exists.

  23. def foreach[U](f: ((String, String)) ⇒ U): Unit

    Permalink
  24. def get(key: String): Seq[String]

    Permalink

    Returns all values for the given key.

    Returns all values for the given key. An Empty Seq is returns if the key doesn't exist or there are no non-null values.

  25. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  26. def getFirst(key: String): Option[String]

    Permalink

    Optionally Returns the first non-null value for the given key

  27. def getFirstNonBlank(key: String): Option[String]

    Permalink

    Optionally Returns the first non-blank value for the given key

  28. def getNonBlank(key: String): Seq[String]

    Permalink

    Returns all non-blank values for the given key.

    Returns all non-blank values for the given key. An Empty Seq is returns if the key doesn't exist or there are no non-null values.

  29. def hasKey(key: String): Boolean

    Permalink

    Returns true if there is a matching key (which doesn't need to have a value)

  30. def hasKeyWithNonBlankValue(key: String): Boolean

    Permalink

    Returns true if there is a matching key (which also has a non-blank value)

  31. def hasKeyWithValue(key: String, value: String): Boolean

    Permalink

    Returns true if there is a matching key which has the given value

    Returns true if there is a matching key which has the given value

    Note: This is an alias for contains() but seems like a more natural name to use in code.

  32. def hasKeyWithValue(key: String): Boolean

    Permalink

    Returns true if there is a matching key (which also has a value)

    Returns true if there is a matching key (which also has a value)

    NOTE: The value can be blank (e.g. "?foo=" is blank vs "?foo" is null)

  33. def hashCode(): Int

    Permalink
    Definition Classes
    QueryParams → AnyRef → Any
  34. def isEmpty: Boolean

    Permalink
  35. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  36. def keysWithNonBlankValues: Set[String]

    Permalink

    The unique set of keys with non-blank values

  37. def keysWithValues: Set[String]

    Permalink

    The unique set of keys with non-null values (blank is a valid value)

  38. def keysWithoutValues: Set[String]

    Permalink

    The unique set of keys without values

  39. def length: Int

    Permalink
  40. def map(f: ((String, String)) ⇒ (String, String)): QueryParams

    Permalink
  41. def mapKeys(f: (String) ⇒ String): QueryParams

    Permalink
  42. def mapValues(f: (String) ⇒ String): QueryParams

    Permalink
  43. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  44. def nonBlank(key: String): Seq[String]

    Permalink

    Returns all non-blank values for the given key or throws a NoSuchElementException if the key doesn't have non-null values.

  45. def nonEmpty: Boolean

    Permalink
  46. def nonNull(key: String): Seq[String]

    Permalink

    Returns all non-null values for the given key or throws a NoSuchElementException if the key doesn't have non-null values.

  47. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  48. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  49. def prettyString: String

    Permalink
  50. def remove(keys: String*): QueryParams

    Permalink

    Remove a key/value pair based on the key

    Remove a key/value pair based on the key

    returns

    A new QueryParams instance without the keys

  51. def replace(key: String, value: String): QueryParams

    Permalink

    Replaces the entry for the given key only if it was previously mapped to some value.

  52. def sorted: QueryParams

    Permalink
  53. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  54. def toMap: Map[String, Seq[String]]

    Permalink

    Convert to a Map[String, Seq[String]]

  55. def toQueryString(): String

    Permalink

    Create a valid query string using the current parameters (everything after the ?).

    Create a valid query string using the current parameters (everything after the ?).

    e.g.: foo=bar&hello=world

  56. def toSeq: Seq[(String, String)]

    Permalink
  57. def toString(): String

    Permalink

    An alias for toQueryString

    An alias for toQueryString

    Definition Classes
    QueryParams → AnyRef → Any
  58. def updated(kvPairs: (String, String)*): QueryParams

    Permalink

    Update multiple key/value pairs

  59. def updated(other: QueryParams): QueryParams

    Permalink

    Update multiple key/value pairs

  60. def updated(key: String, value: String): QueryParams

    Permalink

    If the key doesn't exist then add it, otherwise replace the first occurance of the key with the new value and remove any other values.

  61. def updated(key: String): QueryParams

    Permalink

    Make sure the key (without a value) exists

  62. final def wait(arg0: Long, arg1: Int): Unit

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  64. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  65. def withLowerKeys: QueryParams

    Permalink

    Convert all keys to lower case

  66. def withPrefixedKeys(prefix: String): QueryParams

    Permalink

    Add a prefix to each key

  67. def withoutBlankValues(): QueryParams

    Permalink

    Remove any params with blank values

    Remove any params with blank values

    returns

    A new QueryParams instance without blank values

Deprecated Value Members

  1. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from AnyRef

Inherited from Any

Ungrouped