Class HttpHeaderList.Unmodifiable

All Implemented Interfaces:
Serializable, Cloneable, Iterable<HttpHeader>, Collection<HttpHeader>, List<HttpHeader>, RandomAccess, UnmodifiableBean
Enclosing class:
HttpHeaderList

public static class HttpHeaderList.Unmodifiable extends HttpHeaderList implements UnmodifiableBean
An unmodifiable snapshot of a HttpHeaderList.

This is the "collection-mutator-override" variant of the immutability paradigm. Because HttpHeaderList extends ArrayList, a single funnel cannot intercept the inherited ArrayList mutators, so this subclass snapshot-copies the elements in its constructor and overrides the entire collection-mutator surface — its own fluent mutators plus the inherited ArrayList mutators (including the iterator() / listIterator() mutators) — to throw UnsupportedOperationException. Read operations and non-mutating iteration continue to work.

See Also: