blob: d41cf8e20f96856a1076e68b1c4be7dee1dd6f13 [file] [log] [blame]
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (11.0.8) on Thu Oct 22 13:32:16 CDT 2020 -->
<title>HttpFields.Mutable (Jetty :: Javadoc Build 10.0.0.beta3 API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="dc.created" content="2020-10-22">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
<script type="text/javascript" src="../../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../jquery/jquery-3.3.1.js"></script>
<script type="text/javascript" src="../../../../jquery/jquery-migrate-3.0.1.js"></script>
<script type="text/javascript" src="../../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="HttpFields.Mutable (Jetty :: Javadoc Build 10.0.0.beta3 API)";
}
}
catch(err) {
}
//-->
var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":10,"i30":10,"i31":10,"i32":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../";
var useModuleDirectories = true;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/HttpFields.Mutable.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">org.eclipse.jetty.http</a></div>
<h2 title="Class HttpFields.Mutable" class="title">Class HttpFields.Mutable</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>org.eclipse.jetty.http.HttpFields.Mutable</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><code>java.lang.Iterable&lt;<a href="HttpField.html" title="class in org.eclipse.jetty.http">HttpField</a>&gt;</code>, <code><a href="HttpFields.html" title="interface in org.eclipse.jetty.http">HttpFields</a></code></dd>
</dl>
<dl>
<dt>Direct Known Subclasses:</dt>
<dd><code><a href="HttpTester.Message.html" title="class in org.eclipse.jetty.http">HttpTester.Message</a></code></dd>
</dl>
<dl>
<dt>Enclosing interface:</dt>
<dd><a href="HttpFields.html" title="interface in org.eclipse.jetty.http">HttpFields</a></dd>
</dl>
<hr>
<pre>public static class <span class="typeNameLabel">HttpFields.Mutable</span>
extends java.lang.Object
implements java.lang.Iterable&lt;<a href="HttpField.html" title="class in org.eclipse.jetty.http">HttpField</a>&gt;, <a href="HttpFields.html" title="interface in org.eclipse.jetty.http">HttpFields</a></pre>
<div class="block">HTTP Fields. A collection of HTTP header and or Trailer fields.
<p>This class is not synchronized as it is expected that modifications will only be performed by a
single thread.
<p>The cookie handling provided by this class is guided by the Servlet specification and RFC6265.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="nested.class.summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<ul class="blockList">
<li class="blockList"><a id="nested.classes.inherited.from.class.org.eclipse.jetty.http.HttpFields">
<!-- -->
</a>
<h3>Nested classes/interfaces inherited from interface&nbsp;org.eclipse.jetty.http.<a href="HttpFields.html" title="interface in org.eclipse.jetty.http">HttpFields</a></h3>
<code><a href="HttpFields.Immutable.html" title="class in org.eclipse.jetty.http">HttpFields.Immutable</a>, <a href="HttpFields.Mutable.html" title="class in org.eclipse.jetty.http">HttpFields.Mutable</a></code></li>
</ul>
</li>
</ul>
</section>
<!-- =========== FIELD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<ul class="blockList">
<li class="blockList"><a id="fields.inherited.from.class.org.eclipse.jetty.http.HttpFields">
<!-- -->
</a>
<h3>Fields inherited from interface&nbsp;org.eclipse.jetty.http.<a href="HttpFields.html" title="interface in org.eclipse.jetty.http">HttpFields</a></h3>
<code><a href="HttpFields.html#EMPTY">EMPTY</a></code></li>
</ul>
</li>
</ul>
</section>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier</th>
<th class="colSecond" scope="col">Constructor</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected </code></td>
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E()">Mutable</a></span>()</code></th>
<td class="colLast">
<div class="block">Initialize an empty HttpFields.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- ========== METHOD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code><a href="HttpFields.Mutable.html" title="class in org.eclipse.jetty.http">HttpFields.Mutable</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#add(java.lang.String,java.lang.String)">add</a></span>&#8203;(java.lang.String&nbsp;name,
java.lang.String&nbsp;value)</code></th>
<td class="colLast">
<div class="block">Add to or set a field.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><a href="HttpFields.Mutable.html" title="class in org.eclipse.jetty.http">HttpFields.Mutable</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#add(org.eclipse.jetty.http.HttpField)">add</a></span>&#8203;(<a href="HttpField.html" title="class in org.eclipse.jetty.http">HttpField</a>&nbsp;field)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="HttpFields.Mutable.html" title="class in org.eclipse.jetty.http">HttpFields.Mutable</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#add(org.eclipse.jetty.http.HttpFields)">add</a></span>&#8203;(<a href="HttpFields.html" title="interface in org.eclipse.jetty.http">HttpFields</a>&nbsp;fields)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="HttpFields.Mutable.html" title="class in org.eclipse.jetty.http">HttpFields.Mutable</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#add(org.eclipse.jetty.http.HttpHeader,java.lang.String)">add</a></span>&#8203;(<a href="HttpHeader.html" title="enum in org.eclipse.jetty.http">HttpHeader</a>&nbsp;header,
java.lang.String&nbsp;value)</code></th>
<td class="colLast">
<div class="block">Add to or set a field.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code><a href="HttpFields.Mutable.html" title="class in org.eclipse.jetty.http">HttpFields.Mutable</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#add(org.eclipse.jetty.http.HttpHeader,org.eclipse.jetty.http.HttpHeaderValue)">add</a></span>&#8203;(<a href="HttpHeader.html" title="enum in org.eclipse.jetty.http">HttpHeader</a>&nbsp;header,
<a href="HttpHeaderValue.html" title="enum in org.eclipse.jetty.http">HttpHeaderValue</a>&nbsp;value)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code><a href="HttpFields.Mutable.html" title="class in org.eclipse.jetty.http">HttpFields.Mutable</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addCSV(java.lang.String,java.lang.String...)">addCSV</a></span>&#8203;(java.lang.String&nbsp;name,
java.lang.String...&nbsp;values)</code></th>
<td class="colLast">
<div class="block">Add comma separated values, but only if not already
present.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code><a href="HttpFields.Mutable.html" title="class in org.eclipse.jetty.http">HttpFields.Mutable</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addCSV(org.eclipse.jetty.http.HttpHeader,java.lang.String...)">addCSV</a></span>&#8203;(<a href="HttpHeader.html" title="enum in org.eclipse.jetty.http">HttpHeader</a>&nbsp;header,
java.lang.String...&nbsp;values)</code></th>
<td class="colLast">
<div class="block">Add comma separated values, but only if not already
present.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code><a href="HttpFields.Mutable.html" title="class in org.eclipse.jetty.http">HttpFields.Mutable</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addDateField(java.lang.String,long)">addDateField</a></span>&#8203;(java.lang.String&nbsp;name,
long&nbsp;date)</code></th>
<td class="colLast">
<div class="block">Sets the value of a date field.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code><a href="HttpFields.Immutable.html" title="class in org.eclipse.jetty.http">HttpFields.Immutable</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#asImmutable()">asImmutable</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code><a href="HttpFields.Mutable.html" title="class in org.eclipse.jetty.http">HttpFields.Mutable</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#clear()">clear</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#computeField(java.lang.String,java.util.function.BiFunction)">computeField</a></span>&#8203;(java.lang.String&nbsp;name,
java.util.function.BiFunction&lt;java.lang.String,&#8203;java.util.List&lt;<a href="HttpField.html" title="class in org.eclipse.jetty.http">HttpField</a>&gt;,&#8203;<a href="HttpField.html" title="class in org.eclipse.jetty.http">HttpField</a>&gt;&nbsp;computeFn)</code></th>
<td class="colLast">
<div class="block">Computes a single field for the given HTTP header name and for existing fields with the same name.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#computeField(org.eclipse.jetty.http.HttpHeader,java.util.function.BiFunction)">computeField</a></span>&#8203;(<a href="HttpHeader.html" title="enum in org.eclipse.jetty.http">HttpHeader</a>&nbsp;header,
java.util.function.BiFunction&lt;<a href="HttpHeader.html" title="enum in org.eclipse.jetty.http">HttpHeader</a>,&#8203;java.util.List&lt;<a href="HttpField.html" title="class in org.eclipse.jetty.http">HttpField</a>&gt;,&#8203;<a href="HttpField.html" title="class in org.eclipse.jetty.http">HttpField</a>&gt;&nbsp;computeFn)</code></th>
<td class="colLast">
<div class="block">Computes a single field for the given HttpHeader and for existing fields with the same header.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ensureField(org.eclipse.jetty.http.HttpField)">ensureField</a></span>&#8203;(<a href="HttpField.html" title="class in org.eclipse.jetty.http">HttpField</a>&nbsp;field)</code></th>
<td class="colLast">
<div class="block">Ensure that specific HttpField exists when the field may not exist or may
exist and be multi valued.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#equals(java.lang.Object)">equals</a></span>&#8203;(java.lang.Object&nbsp;o)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code><a href="HttpField.html" title="class in org.eclipse.jetty.http">HttpField</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getField(int)">getField</a></span>&#8203;(int&nbsp;index)</code></th>
<td class="colLast">
<div class="block">Get a Field by index.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#hashCode()">hashCode</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>java.util.Iterator&lt;<a href="HttpField.html" title="class in org.eclipse.jetty.http">HttpField</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#iterator()">iterator</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>java.util.ListIterator&lt;<a href="HttpField.html" title="class in org.eclipse.jetty.http">HttpField</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#listIterator()">listIterator</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code><a href="HttpFields.Mutable.html" title="class in org.eclipse.jetty.http">HttpFields.Mutable</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#put(java.lang.String,java.lang.String)">put</a></span>&#8203;(java.lang.String&nbsp;name,
java.lang.String&nbsp;value)</code></th>
<td class="colLast">
<div class="block">Set a field.</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code><a href="HttpFields.Mutable.html" title="class in org.eclipse.jetty.http">HttpFields.Mutable</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#put(java.lang.String,java.util.List)">put</a></span>&#8203;(java.lang.String&nbsp;name,
java.util.List&lt;java.lang.String&gt;&nbsp;list)</code></th>
<td class="colLast">
<div class="block">Set a field.</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code><a href="HttpFields.Mutable.html" title="class in org.eclipse.jetty.http">HttpFields.Mutable</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#put(org.eclipse.jetty.http.HttpField)">put</a></span>&#8203;(<a href="HttpField.html" title="class in org.eclipse.jetty.http">HttpField</a>&nbsp;field)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code><a href="HttpFields.Mutable.html" title="class in org.eclipse.jetty.http">HttpFields.Mutable</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#put(org.eclipse.jetty.http.HttpHeader,java.lang.String)">put</a></span>&#8203;(<a href="HttpHeader.html" title="enum in org.eclipse.jetty.http">HttpHeader</a>&nbsp;header,
java.lang.String&nbsp;value)</code></th>
<td class="colLast">
<div class="block">Set a field.</div>
</td>
</tr>
<tr id="i22" class="altColor">
<td class="colFirst"><code><a href="HttpFields.Mutable.html" title="class in org.eclipse.jetty.http">HttpFields.Mutable</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#put(org.eclipse.jetty.http.HttpHeader,org.eclipse.jetty.http.HttpHeaderValue)">put</a></span>&#8203;(<a href="HttpHeader.html" title="enum in org.eclipse.jetty.http">HttpHeader</a>&nbsp;header,
<a href="HttpHeaderValue.html" title="enum in org.eclipse.jetty.http">HttpHeaderValue</a>&nbsp;value)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i23" class="rowColor">
<td class="colFirst"><code><a href="HttpFields.Mutable.html" title="class in org.eclipse.jetty.http">HttpFields.Mutable</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#putDateField(java.lang.String,long)">putDateField</a></span>&#8203;(java.lang.String&nbsp;name,
long&nbsp;date)</code></th>
<td class="colLast">
<div class="block">Sets the value of a date field.</div>
</td>
</tr>
<tr id="i24" class="altColor">
<td class="colFirst"><code><a href="HttpFields.Mutable.html" title="class in org.eclipse.jetty.http">HttpFields.Mutable</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#putDateField(org.eclipse.jetty.http.HttpHeader,long)">putDateField</a></span>&#8203;(<a href="HttpHeader.html" title="enum in org.eclipse.jetty.http">HttpHeader</a>&nbsp;name,
long&nbsp;date)</code></th>
<td class="colLast">
<div class="block">Sets the value of a date field.</div>
</td>
</tr>
<tr id="i25" class="rowColor">
<td class="colFirst"><code><a href="HttpFields.Mutable.html" title="class in org.eclipse.jetty.http">HttpFields.Mutable</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#putLongField(java.lang.String,long)">putLongField</a></span>&#8203;(java.lang.String&nbsp;name,
long&nbsp;value)</code></th>
<td class="colLast">
<div class="block">Sets the value of an long field.</div>
</td>
</tr>
<tr id="i26" class="altColor">
<td class="colFirst"><code><a href="HttpFields.Mutable.html" title="class in org.eclipse.jetty.http">HttpFields.Mutable</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#putLongField(org.eclipse.jetty.http.HttpHeader,long)">putLongField</a></span>&#8203;(<a href="HttpHeader.html" title="enum in org.eclipse.jetty.http">HttpHeader</a>&nbsp;name,
long&nbsp;value)</code></th>
<td class="colLast">
<div class="block">Sets the value of an long field.</div>
</td>
</tr>
<tr id="i27" class="rowColor">
<td class="colFirst"><code><a href="HttpFields.Mutable.html" title="class in org.eclipse.jetty.http">HttpFields.Mutable</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#remove(java.lang.String)">remove</a></span>&#8203;(java.lang.String&nbsp;name)</code></th>
<td class="colLast">
<div class="block">Remove a field.</div>
</td>
</tr>
<tr id="i28" class="altColor">
<td class="colFirst"><code><a href="HttpFields.Mutable.html" title="class in org.eclipse.jetty.http">HttpFields.Mutable</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#remove(java.util.EnumSet)">remove</a></span>&#8203;(java.util.EnumSet&lt;<a href="HttpHeader.html" title="enum in org.eclipse.jetty.http">HttpHeader</a>&gt;&nbsp;fields)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i29" class="rowColor">
<td class="colFirst"><code><a href="HttpFields.Mutable.html" title="class in org.eclipse.jetty.http">HttpFields.Mutable</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#remove(org.eclipse.jetty.http.HttpHeader)">remove</a></span>&#8203;(<a href="HttpHeader.html" title="enum in org.eclipse.jetty.http">HttpHeader</a>&nbsp;name)</code></th>
<td class="colLast">
<div class="block">Remove a field.</div>
</td>
</tr>
<tr id="i30" class="altColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#size()">size</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i31" class="rowColor">
<td class="colFirst"><code>java.util.stream.Stream&lt;<a href="HttpField.html" title="class in org.eclipse.jetty.http">HttpField</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#stream()">stream</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i32" class="altColor">
<td class="colFirst"><code>java.lang.String</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toString()">toString</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<code>clone, finalize, getClass, notify, notifyAll, wait, wait, wait</code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.org.eclipse.jetty.http.HttpFields">
<!-- -->
</a>
<h3>Methods inherited from interface&nbsp;org.eclipse.jetty.http.<a href="HttpFields.html" title="interface in org.eclipse.jetty.http">HttpFields</a></h3>
<code><a href="HttpFields.html#asString()">asString</a>, <a href="HttpFields.html#contains(java.lang.String)">contains</a>, <a href="HttpFields.html#contains(java.lang.String,java.lang.String)">contains</a>, <a href="HttpFields.html#contains(java.util.EnumSet)">contains</a>, <a href="HttpFields.html#contains(org.eclipse.jetty.http.HttpField)">contains</a>, <a href="HttpFields.html#contains(org.eclipse.jetty.http.HttpHeader)">contains</a>, <a href="HttpFields.html#contains(org.eclipse.jetty.http.HttpHeader,java.lang.String)">contains</a>, <a href="HttpFields.html#get(java.lang.String)">get</a>, <a href="HttpFields.html#get(org.eclipse.jetty.http.HttpHeader)">get</a>, <a href="HttpFields.html#getCSV(java.lang.String,boolean)">getCSV</a>, <a href="HttpFields.html#getCSV(org.eclipse.jetty.http.HttpHeader,boolean)">getCSV</a>, <a href="HttpFields.html#getDateField(java.lang.String)">getDateField</a>, <a href="HttpFields.html#getField(java.lang.String)">getField</a>, <a href="HttpFields.html#getField(org.eclipse.jetty.http.HttpHeader)">getField</a>, <a href="HttpFields.html#getFieldNames()">getFieldNames</a>, <a href="HttpFields.html#getFieldNamesCollection()">getFieldNamesCollection</a>, <a href="HttpFields.html#getFields(java.lang.String)">getFields</a>, <a href="HttpFields.html#getFields(org.eclipse.jetty.http.HttpHeader)">getFields</a>, <a href="HttpFields.html#getLongField(java.lang.String)">getLongField</a>, <a href="HttpFields.html#getLongField(org.eclipse.jetty.http.HttpHeader)">getLongField</a>, <a href="HttpFields.html#getQualityCSV(java.lang.String)">getQualityCSV</a>, <a href="HttpFields.html#getQualityCSV(org.eclipse.jetty.http.HttpHeader)">getQualityCSV</a>, <a href="HttpFields.html#getQualityCSV(org.eclipse.jetty.http.HttpHeader,java.util.function.ToIntFunction)">getQualityCSV</a>, <a href="HttpFields.html#getValues(java.lang.String)">getValues</a>, <a href="HttpFields.html#getValuesList(java.lang.String)">getValuesList</a>, <a href="HttpFields.html#getValuesList(org.eclipse.jetty.http.HttpHeader)">getValuesList</a>, <a href="HttpFields.html#isEqualTo(org.eclipse.jetty.http.HttpFields)">isEqualTo</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.java.lang.Iterable">
<!-- -->
</a>
<h3>Methods inherited from interface&nbsp;java.lang.Iterable</h3>
<code>forEach, spliterator</code></li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a id="&lt;init&gt;()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>Mutable</h4>
<pre>protected&nbsp;Mutable()</pre>
<div class="block">Initialize an empty HttpFields.</div>
</li>
</ul>
</li>
</ul>
</section>
<!-- ============ METHOD DETAIL ========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a id="add(java.lang.String,java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>add</h4>
<pre class="methodSignature">public&nbsp;<a href="HttpFields.Mutable.html" title="class in org.eclipse.jetty.http">HttpFields.Mutable</a>&nbsp;add&#8203;(java.lang.String&nbsp;name,
java.lang.String&nbsp;value)</pre>
<div class="block">Add to or set a field. If the field is allowed to have multiple values, add will add multiple
headers of the same name.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the field</dd>
<dd><code>value</code> - the value of the field.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this builder</dd>
</dl>
</li>
</ul>
<a id="add(org.eclipse.jetty.http.HttpHeader,org.eclipse.jetty.http.HttpHeaderValue)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>add</h4>
<pre class="methodSignature">public&nbsp;<a href="HttpFields.Mutable.html" title="class in org.eclipse.jetty.http">HttpFields.Mutable</a>&nbsp;add&#8203;(<a href="HttpHeader.html" title="enum in org.eclipse.jetty.http">HttpHeader</a>&nbsp;header,
<a href="HttpHeaderValue.html" title="enum in org.eclipse.jetty.http">HttpHeaderValue</a>&nbsp;value)</pre>
</li>
</ul>
<a id="add(org.eclipse.jetty.http.HttpHeader,java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>add</h4>
<pre class="methodSignature">public&nbsp;<a href="HttpFields.Mutable.html" title="class in org.eclipse.jetty.http">HttpFields.Mutable</a>&nbsp;add&#8203;(<a href="HttpHeader.html" title="enum in org.eclipse.jetty.http">HttpHeader</a>&nbsp;header,
java.lang.String&nbsp;value)</pre>
<div class="block">Add to or set a field. If the field is allowed to have multiple values, add will add multiple
headers of the same name.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>header</code> - the header</dd>
<dd><code>value</code> - the value of the field.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this builder</dd>
</dl>
</li>
</ul>
<a id="add(org.eclipse.jetty.http.HttpField)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>add</h4>
<pre class="methodSignature">public&nbsp;<a href="HttpFields.Mutable.html" title="class in org.eclipse.jetty.http">HttpFields.Mutable</a>&nbsp;add&#8203;(<a href="HttpField.html" title="class in org.eclipse.jetty.http">HttpField</a>&nbsp;field)</pre>
</li>
</ul>
<a id="add(org.eclipse.jetty.http.HttpFields)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>add</h4>
<pre class="methodSignature">public&nbsp;<a href="HttpFields.Mutable.html" title="class in org.eclipse.jetty.http">HttpFields.Mutable</a>&nbsp;add&#8203;(<a href="HttpFields.html" title="interface in org.eclipse.jetty.http">HttpFields</a>&nbsp;fields)</pre>
</li>
</ul>
<a id="addCSV(org.eclipse.jetty.http.HttpHeader,java.lang.String...)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addCSV</h4>
<pre class="methodSignature">public&nbsp;<a href="HttpFields.Mutable.html" title="class in org.eclipse.jetty.http">HttpFields.Mutable</a>&nbsp;addCSV&#8203;(<a href="HttpHeader.html" title="enum in org.eclipse.jetty.http">HttpHeader</a>&nbsp;header,
java.lang.String...&nbsp;values)</pre>
<div class="block">Add comma separated values, but only if not already
present.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>header</code> - The header to add the value(s) to</dd>
<dd><code>values</code> - The value(s) to add</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this builder</dd>
</dl>
</li>
</ul>
<a id="addCSV(java.lang.String,java.lang.String...)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addCSV</h4>
<pre class="methodSignature">public&nbsp;<a href="HttpFields.Mutable.html" title="class in org.eclipse.jetty.http">HttpFields.Mutable</a>&nbsp;addCSV&#8203;(java.lang.String&nbsp;name,
java.lang.String...&nbsp;values)</pre>
<div class="block">Add comma separated values, but only if not already
present.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - The header to add the value(s) to</dd>
<dd><code>values</code> - The value(s) to add</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this builder</dd>
</dl>
</li>
</ul>
<a id="addDateField(java.lang.String,long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addDateField</h4>
<pre class="methodSignature">public&nbsp;<a href="HttpFields.Mutable.html" title="class in org.eclipse.jetty.http">HttpFields.Mutable</a>&nbsp;addDateField&#8203;(java.lang.String&nbsp;name,
long&nbsp;date)</pre>
<div class="block">Sets the value of a date field.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the field name</dd>
<dd><code>date</code> - the field date value</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this builder</dd>
</dl>
</li>
</ul>
<a id="asImmutable()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>asImmutable</h4>
<pre class="methodSignature">public&nbsp;<a href="HttpFields.Immutable.html" title="class in org.eclipse.jetty.http">HttpFields.Immutable</a>&nbsp;asImmutable()</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="HttpFields.html#asImmutable()">asImmutable</a></code>&nbsp;in interface&nbsp;<code><a href="HttpFields.html" title="interface in org.eclipse.jetty.http">HttpFields</a></code></dd>
</dl>
</li>
</ul>
<a id="clear()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>clear</h4>
<pre class="methodSignature">public&nbsp;<a href="HttpFields.Mutable.html" title="class in org.eclipse.jetty.http">HttpFields.Mutable</a>&nbsp;clear()</pre>
</li>
</ul>
<a id="ensureField(org.eclipse.jetty.http.HttpField)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ensureField</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;ensureField&#8203;(<a href="HttpField.html" title="class in org.eclipse.jetty.http">HttpField</a>&nbsp;field)</pre>
<div class="block">Ensure that specific HttpField exists when the field may not exist or may
exist and be multi valued. Multiple existing fields are merged into a
single field.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>field</code> - The header to ensure is contained. The field is used
directly if possible so <a href="PreEncodedHttpField.html" title="class in org.eclipse.jetty.http"><code>PreEncodedHttpField</code></a>s can be
passed. If the value needs to be merged with existing values,
then a new field is created.</dd>
</dl>
</li>
</ul>
<a id="equals(java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>equals</h4>
<pre class="methodSignature">public&nbsp;boolean&nbsp;equals&#8203;(java.lang.Object&nbsp;o)</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code>equals</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd>
</dl>
</li>
</ul>
<a id="getField(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getField</h4>
<pre class="methodSignature">public&nbsp;<a href="HttpField.html" title="class in org.eclipse.jetty.http">HttpField</a>&nbsp;getField&#8203;(int&nbsp;index)</pre>
<div class="block">Get a Field by index.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="HttpFields.html#getField(int)">getField</a></code>&nbsp;in interface&nbsp;<code><a href="HttpFields.html" title="interface in org.eclipse.jetty.http">HttpFields</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>index</code> - the field index</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>A Field value or null if the Field value has not been set</dd>
</dl>
</li>
</ul>
<a id="hashCode()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hashCode</h4>
<pre class="methodSignature">public&nbsp;int&nbsp;hashCode()</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code>hashCode</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd>
</dl>
</li>
</ul>
<a id="iterator()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>iterator</h4>
<pre class="methodSignature">public&nbsp;java.util.Iterator&lt;<a href="HttpField.html" title="class in org.eclipse.jetty.http">HttpField</a>&gt;&nbsp;iterator()</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code>iterator</code>&nbsp;in interface&nbsp;<code>java.lang.Iterable&lt;<a href="HttpField.html" title="class in org.eclipse.jetty.http">HttpField</a>&gt;</code></dd>
</dl>
</li>
</ul>
<a id="listIterator()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>listIterator</h4>
<pre class="methodSignature">public&nbsp;java.util.ListIterator&lt;<a href="HttpField.html" title="class in org.eclipse.jetty.http">HttpField</a>&gt;&nbsp;listIterator()</pre>
</li>
</ul>
<a id="put(org.eclipse.jetty.http.HttpField)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>put</h4>
<pre class="methodSignature">public&nbsp;<a href="HttpFields.Mutable.html" title="class in org.eclipse.jetty.http">HttpFields.Mutable</a>&nbsp;put&#8203;(<a href="HttpField.html" title="class in org.eclipse.jetty.http">HttpField</a>&nbsp;field)</pre>
</li>
</ul>
<a id="put(java.lang.String,java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>put</h4>
<pre class="methodSignature">public&nbsp;<a href="HttpFields.Mutable.html" title="class in org.eclipse.jetty.http">HttpFields.Mutable</a>&nbsp;put&#8203;(java.lang.String&nbsp;name,
java.lang.String&nbsp;value)</pre>
<div class="block">Set a field.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the field</dd>
<dd><code>value</code> - the value of the field. If null the field is cleared.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this builder</dd>
</dl>
</li>
</ul>
<a id="put(org.eclipse.jetty.http.HttpHeader,org.eclipse.jetty.http.HttpHeaderValue)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>put</h4>
<pre class="methodSignature">public&nbsp;<a href="HttpFields.Mutable.html" title="class in org.eclipse.jetty.http">HttpFields.Mutable</a>&nbsp;put&#8203;(<a href="HttpHeader.html" title="enum in org.eclipse.jetty.http">HttpHeader</a>&nbsp;header,
<a href="HttpHeaderValue.html" title="enum in org.eclipse.jetty.http">HttpHeaderValue</a>&nbsp;value)</pre>
</li>
</ul>
<a id="put(org.eclipse.jetty.http.HttpHeader,java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>put</h4>
<pre class="methodSignature">public&nbsp;<a href="HttpFields.Mutable.html" title="class in org.eclipse.jetty.http">HttpFields.Mutable</a>&nbsp;put&#8203;(<a href="HttpHeader.html" title="enum in org.eclipse.jetty.http">HttpHeader</a>&nbsp;header,
java.lang.String&nbsp;value)</pre>
<div class="block">Set a field.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>header</code> - the header name of the field</dd>
<dd><code>value</code> - the value of the field. If null the field is cleared.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this builder</dd>
</dl>
</li>
</ul>
<a id="put(java.lang.String,java.util.List)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>put</h4>
<pre class="methodSignature">public&nbsp;<a href="HttpFields.Mutable.html" title="class in org.eclipse.jetty.http">HttpFields.Mutable</a>&nbsp;put&#8203;(java.lang.String&nbsp;name,
java.util.List&lt;java.lang.String&gt;&nbsp;list)</pre>
<div class="block">Set a field.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the name of the field</dd>
<dd><code>list</code> - the List value of the field. If null the field is cleared.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this builder</dd>
</dl>
</li>
</ul>
<a id="putDateField(org.eclipse.jetty.http.HttpHeader,long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putDateField</h4>
<pre class="methodSignature">public&nbsp;<a href="HttpFields.Mutable.html" title="class in org.eclipse.jetty.http">HttpFields.Mutable</a>&nbsp;putDateField&#8203;(<a href="HttpHeader.html" title="enum in org.eclipse.jetty.http">HttpHeader</a>&nbsp;name,
long&nbsp;date)</pre>
<div class="block">Sets the value of a date field.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the field name</dd>
<dd><code>date</code> - the field date value</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this builder</dd>
</dl>
</li>
</ul>
<a id="putDateField(java.lang.String,long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putDateField</h4>
<pre class="methodSignature">public&nbsp;<a href="HttpFields.Mutable.html" title="class in org.eclipse.jetty.http">HttpFields.Mutable</a>&nbsp;putDateField&#8203;(java.lang.String&nbsp;name,
long&nbsp;date)</pre>
<div class="block">Sets the value of a date field.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the field name</dd>
<dd><code>date</code> - the field date value</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this builder</dd>
</dl>
</li>
</ul>
<a id="putLongField(org.eclipse.jetty.http.HttpHeader,long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putLongField</h4>
<pre class="methodSignature">public&nbsp;<a href="HttpFields.Mutable.html" title="class in org.eclipse.jetty.http">HttpFields.Mutable</a>&nbsp;putLongField&#8203;(<a href="HttpHeader.html" title="enum in org.eclipse.jetty.http">HttpHeader</a>&nbsp;name,
long&nbsp;value)</pre>
<div class="block">Sets the value of an long field.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the field name</dd>
<dd><code>value</code> - the field long value</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this builder</dd>
</dl>
</li>
</ul>
<a id="putLongField(java.lang.String,long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putLongField</h4>
<pre class="methodSignature">public&nbsp;<a href="HttpFields.Mutable.html" title="class in org.eclipse.jetty.http">HttpFields.Mutable</a>&nbsp;putLongField&#8203;(java.lang.String&nbsp;name,
long&nbsp;value)</pre>
<div class="block">Sets the value of an long field.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the field name</dd>
<dd><code>value</code> - the field long value</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this builder</dd>
</dl>
</li>
</ul>
<a id="computeField(org.eclipse.jetty.http.HttpHeader,java.util.function.BiFunction)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>computeField</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;computeField&#8203;(<a href="HttpHeader.html" title="enum in org.eclipse.jetty.http">HttpHeader</a>&nbsp;header,
java.util.function.BiFunction&lt;<a href="HttpHeader.html" title="enum in org.eclipse.jetty.http">HttpHeader</a>,&#8203;java.util.List&lt;<a href="HttpField.html" title="class in org.eclipse.jetty.http">HttpField</a>&gt;,&#8203;<a href="HttpField.html" title="class in org.eclipse.jetty.http">HttpField</a>&gt;&nbsp;computeFn)</pre>
<div class="block"><p>Computes a single field for the given HttpHeader and for existing fields with the same header.</p>
<p>The compute function receives the field name and a list of fields with the same name
so that their values can be used to compute the value of the field that is returned
by the compute function.
If the compute function returns <code>null</code>, the fields with the given name are removed.</p>
<p>This method comes handy when you want to add an HTTP header if it does not exist,
or add a value if the HTTP header already exists, similarly to
<code>Map.compute(Object, BiFunction)</code>.</p>
<p>This method can be used to <a href="#put(org.eclipse.jetty.http.HttpField)"><code>put</code></a> a new field (or blindly replace its value):</p>
<pre>
httpFields.computeField("X-New-Header",
(name, fields) -&gt; new HttpField(name, "NewValue"));
</pre>
<p>This method can be used to coalesce many fields into one:</p>
<pre>
// Input:
GET / HTTP/1.1
Host: localhost
Cookie: foo=1
Cookie: bar=2,baz=3
User-Agent: Jetty
// Computation:
httpFields.computeField("Cookie", (name, fields) -&gt;
{
// No cookies, nothing to do.
if (fields == null)
return null;
// Coalesces all cookies.
String coalesced = fields.stream()
.flatMap(field -&gt; Stream.of(field.getValues()))
.collect(Collectors.joining(", "));
// Returns a single Cookie header with all cookies.
return new HttpField(name, coalesced);
}
// Output:
GET / HTTP/1.1
Host: localhost
Cookie: foo=1, bar=2, baz=3
User-Agent: Jetty
</pre>
<p>This method can be used to replace a field:</p>
<pre>
httpFields.computeField("X-Length", (name, fields) -&gt;
{
if (fields == null)
return null;
// Get any value among the X-Length headers.
String length = fields.stream()
.map(HttpField::getValue)
.findAny()
.orElse("0");
// Replace X-Length headers with X-Capacity header.
return new HttpField("X-Capacity", length);
});
</pre>
<p>This method can be used to remove a field:</p>
<pre>
httpFields.computeField("Connection", (name, fields) -&gt; null);
</pre></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>header</code> - the HTTP header</dd>
<dd><code>computeFn</code> - the compute function</dd>
</dl>
</li>
</ul>
<a id="computeField(java.lang.String,java.util.function.BiFunction)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>computeField</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;computeField&#8203;(java.lang.String&nbsp;name,
java.util.function.BiFunction&lt;java.lang.String,&#8203;java.util.List&lt;<a href="HttpField.html" title="class in org.eclipse.jetty.http">HttpField</a>&gt;,&#8203;<a href="HttpField.html" title="class in org.eclipse.jetty.http">HttpField</a>&gt;&nbsp;computeFn)</pre>
<div class="block"><p>Computes a single field for the given HTTP header name and for existing fields with the same name.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the HTTP header name</dd>
<dd><code>computeFn</code> - the compute function</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#computeField(org.eclipse.jetty.http.HttpHeader,java.util.function.BiFunction)"><code>computeField(HttpHeader, BiFunction)</code></a></dd>
</dl>
</li>
</ul>
<a id="remove(org.eclipse.jetty.http.HttpHeader)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>remove</h4>
<pre class="methodSignature">public&nbsp;<a href="HttpFields.Mutable.html" title="class in org.eclipse.jetty.http">HttpFields.Mutable</a>&nbsp;remove&#8203;(<a href="HttpHeader.html" title="enum in org.eclipse.jetty.http">HttpHeader</a>&nbsp;name)</pre>
<div class="block">Remove a field.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the field to remove</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this builder</dd>
</dl>
</li>
</ul>
<a id="remove(java.util.EnumSet)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>remove</h4>
<pre class="methodSignature">public&nbsp;<a href="HttpFields.Mutable.html" title="class in org.eclipse.jetty.http">HttpFields.Mutable</a>&nbsp;remove&#8203;(java.util.EnumSet&lt;<a href="HttpHeader.html" title="enum in org.eclipse.jetty.http">HttpHeader</a>&gt;&nbsp;fields)</pre>
</li>
</ul>
<a id="remove(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>remove</h4>
<pre class="methodSignature">public&nbsp;<a href="HttpFields.Mutable.html" title="class in org.eclipse.jetty.http">HttpFields.Mutable</a>&nbsp;remove&#8203;(java.lang.String&nbsp;name)</pre>
<div class="block">Remove a field.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>name</code> - the field to remove</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this builder</dd>
</dl>
</li>
</ul>
<a id="size()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>size</h4>
<pre class="methodSignature">public&nbsp;int&nbsp;size()</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="HttpFields.html#size()">size</a></code>&nbsp;in interface&nbsp;<code><a href="HttpFields.html" title="interface in org.eclipse.jetty.http">HttpFields</a></code></dd>
</dl>
</li>
</ul>
<a id="stream()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>stream</h4>
<pre class="methodSignature">public&nbsp;java.util.stream.Stream&lt;<a href="HttpField.html" title="class in org.eclipse.jetty.http">HttpField</a>&gt;&nbsp;stream()</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="HttpFields.html#stream()">stream</a></code>&nbsp;in interface&nbsp;<code><a href="HttpFields.html" title="interface in org.eclipse.jetty.http">HttpFields</a></code></dd>
</dl>
</li>
</ul>
<a id="toString()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>toString</h4>
<pre class="methodSignature">public&nbsp;java.lang.String&nbsp;toString()</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code>toString</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>
<!-- ========= END OF CLASS DATA ========= -->
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/HttpFields.Mutable.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
<p class="legalCopy"><small>Copyright &#169; 1995&#x2013;2020 <a href="https://webtide.com">Webtide</a>. All rights reserved.</small></p>
</footer>
</body>
</html>