| Modifier and Type | Field and Description |
|---|---|
| private final Header[] | allHeaders
An array of headers to iterate over. |
| private int | currentIndex
The position of the next header in |
| private final String | headerName
The header name to filter by. |
| Access | Constructor and Description |
|---|---|
| public | BasicHeaderIterator(final Header[]
an array 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 |
|---|---|
| private 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. |
| private 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 | |
| public Header | Returns: the next header in this iterationImplements java. |
| public void |
| allHeaders | back to summary |
|---|---|
| private final Header[] allHeaders An array of headers to iterate over. Not all elements of this array are necessarily part of the iteration. This array will never be modified by the iterator. Derived implementations are expected to adhere to this restriction. | |
| currentIndex | back to summary |
|---|---|
| private int currentIndex The position of the next header in | |
| headerName | back to summary |
|---|---|
| private final String headerName The header name to filter by.
| |
| BasicHeaderIterator | back to summary |
|---|---|
| public BasicHeaderIterator(final Header[] headers, final String name) Creates a new header iterator. | |
| filterHeader | back to summary |
|---|---|
| private boolean filterHeader(final int index) Checks whether a header is part of the iteration.
| |
| findNext | back to summary |
|---|---|
| private int findNext(final int pos) Determines the index of the next header.
| |
| hasNext | back to summary |
|---|---|
| public boolean hasNext() Implements java. Doc from java. Returns
| |
| next | back to summary |
|---|---|
| public Header next() throws NoSuchElementException Implements java. Obtains the next header from this iteration.
| |
| remove | back to summary |
|---|---|
| public void remove() throws UnsupportedOperationException Overrides default java. Removing headers is not supported.
| |