StringValuesSingleImpl

open class StringValuesSingleImpl : StringValues

Constructors

<init>

StringValuesSingleImpl(
    caseInsensitiveName: Boolean,
    name: String,
    values: List<String>)

Properties

caseInsensitiveName

open val caseInsensitiveName: Boolean

Specifies if map has case-sensitive or case-insensitive names

name

val name: String

values

val values: List<String>

Functions

contains

open fun contains(name: String): Boolean

Checks if the given name exists in the map

open fun contains(name: String, value: String): Boolean

Checks if the given name and value pair exists in the map

entries

open fun entries(): Set<Entry<String, List<String>>>

Gets all entries from the map

equals

open fun equals(other: Any?): Boolean

forEach

open fun forEach(body: (String, List<String>) -> Unit): Unit

Iterates over all entries in this map and calls body for each pair

get

open fun get(name: String): String?

Gets first value from the list of values associated with a name, or null if the name is not present

getAll

open fun getAll(name: String): List<String>?

Gets all values associated with the name, or null if the name is not present

hashCode

open fun hashCode(): Int

isEmpty

open fun isEmpty(): Boolean

Checks if this map is empty

names

open fun names(): Set<String>

Gets all names from the map

toString

open fun toString(): String

Extension Functions

filter

fun StringValues.filter(
    keepEmpty: Boolean = false,
    predicate: (String, String) -> Boolean
): StringValues

Create a new instance of StringValues filtered by the specified predicate

flattenEntries

fun StringValues.flattenEntries(): List<Pair<String, String>>

Copy values to a list of pairs

flattenForEach

fun StringValues.flattenForEach(
    block: (String, String) -> Unit
): Unit

Invoke block function for every value pair

toMap

fun StringValues.toMap(): Map<String, List<String>>

Copy values to a new independent map

Inheritors

HeadersSingleImpl

class HeadersSingleImpl : Headers, StringValuesSingleImpl

ParametersSingleImpl

class ParametersSingleImpl : 
    Parameters,
    StringValuesSingleImpl