public abstract static class HeaderUtils.CookiesByNameIterator extends java.lang.Object implements java.util.Iterator<HttpCookiePair>
Iterator
of HttpCookiePair
designed to iterate across multiple values of
HttpHeaderNames.COOKIE
for a specific cookie-name
.Modifier | Constructor and Description |
---|---|
protected |
CookiesByNameIterator(java.lang.CharSequence cookiePairName)
Create a new instance.
|
Modifier and Type | Method and Description |
---|---|
protected abstract void |
advanceCookieHeaderValue()
Advance the
cookieHeaderValue() to the next HttpHeaderNames.COOKIE header value. |
protected abstract java.lang.CharSequence |
cookieHeaderValue()
Get the current value for
HttpHeaderNames.COOKIE . |
boolean |
hasNext() |
protected void |
initNext(java.lang.CharSequence cookieHeaderValue)
Initialize the next
HttpCookiePair value for next() . |
HttpCookiePair |
next() |
protected CookiesByNameIterator(java.lang.CharSequence cookiePairName)
cookiePairName
- Each return value of next()
will have HttpCookiePair.name()
equivalent
to this value.public final boolean hasNext()
hasNext
in interface java.util.Iterator<HttpCookiePair>
public final HttpCookiePair next()
next
in interface java.util.Iterator<HttpCookiePair>
@Nullable protected abstract java.lang.CharSequence cookieHeaderValue()
HttpHeaderNames.COOKIE
. This value may change during iteration.HttpHeaderNames.COOKIE
, or null
if all have been iterated.protected abstract void advanceCookieHeaderValue()
cookieHeaderValue()
to the next HttpHeaderNames.COOKIE
header value.protected final void initNext(java.lang.CharSequence cookieHeaderValue)
HttpCookiePair
value for next()
.cookieHeaderValue
- The initial value for HttpHeaderNames.COOKIE
.