| Modifier and Type | Field and Description |
|---|---|
| protected final List | allHeaders
A list of headers to iterate over. |
| protected int | currentIndex
The position of the next header in |
| protected String | headerName
The header name to filter by. |
| protected int | lastIndex
The position of the last returned header. |
| Access | Constructor and Description |
|---|---|
| public | BasicListHeaderIterator(final List<Header>
a list of headers over which to iterate headers, final String the name of the headers over which to iterate, or
name)null for anyCreates a new header iterator. |
| Modifier and Type | Method and Description |
|---|---|
| protected boolean | Returns: true if the header should be part of the
iteration, false to skipthe index of the header to check index)Checks whether a header is part of the iteration. |
| protected int | Returns: the index of the next header that matches the filter name, or negative if there are no more headersone less than the index to consider first,
-1 to search for the first header pos)Determines the index of the next header. |
| public boolean | hasNext()
Implements org. |
| public final Object | Returns: the next header in this iterationImplements java. |
| public Header | Returns: the next header in this iterationImplements org. |
| public void |
| allHeaders | back to summary |
|---|---|
| protected final List<Header> allHeaders A list of headers to iterate over. Not all elements of this array are necessarily part of the iteration. | |
| currentIndex | back to summary |
|---|---|
| protected int currentIndex The position of the next header in | |
| headerName | back to summary |
|---|---|
| protected String headerName The header name to filter by.
| |
| lastIndex | back to summary |
|---|---|
| protected int lastIndex The position of the last returned header. Negative if none has been returned so far. | |
| BasicListHeaderIterator | back to summary |
|---|---|
| public BasicListHeaderIterator(final List<Header> headers, final String name) Creates a new header iterator. | |
| filterHeader | back to summary |
|---|---|
| protected boolean filterHeader(final int index) Checks whether a header is part of the iteration.
| |
| findNext | back to summary |
|---|---|
| protected int findNext(final int pos) Determines the index of the next header.
| |
| hasNext | back to summary |
|---|---|
| public boolean hasNext() Implements org. Doc from org. Indicates whether there is another header in this iteration.
| |
| next | back to summary |
|---|---|
| public final Object next() throws NoSuchElementException Implements java. Returns the next header.
Same as
| |
| nextHeader | back to summary |
|---|---|
| public Header nextHeader() throws NoSuchElementException Implements org. Obtains the next header from this iteration.
| |
| remove | back to summary |
|---|---|
| public void remove() throws UnsupportedOperationException Overrides default java. Removes the header that was returned last.
| |