StringValuesBuilder

open class StringValuesBuilder

Constructors

<init>

StringValuesBuilder(
    caseInsensitiveName: Boolean = false,
    size: Int = 8)

Properties

built

var built: Boolean

caseInsensitiveName

val caseInsensitiveName: Boolean

values

Functions

append

fun append(name: String, value: String): Unit

appendAll

fun appendAll(stringValues: StringValues): Unit
fun appendAll(name: String, values: Iterable<String>): Unit

appendMissing

fun appendMissing(stringValues: StringValues): Unit
fun appendMissing(
    name: String,
    values: Iterable<String>
): Unit

build

open fun build(): StringValues

clear

fun clear(): Unit

contains

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

entries

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

get

operator fun get(name: String): String?

getAll

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

isEmpty

fun isEmpty(): Boolean

names

fun names(): MutableSet<String>

remove

fun remove(name: String): Unit
fun remove(name: String, value: String): Boolean

removeKeysWithNoEntries

fun removeKeysWithNoEntries(): Unit

set

operator fun set(name: String, value: String): Unit

Extension Functions

append

fun StringValuesBuilder.append(
    name: String,
    value: HeaderValueWithParameters
): Unit

Append formatted header value to the builder

appendAll

Append all values from the specified builder

appendFiltered

fun StringValuesBuilder.appendFiltered(
    source: StringValues,
    keepEmpty: Boolean = false,
    predicate: (String, String) -> Boolean
): Unit

Append values from source filtering values by the specified predicate

Inheritors

HeadersBuilder

class HeadersBuilder : StringValuesBuilder

ParametersBuilder

class ParametersBuilder : StringValuesBuilder