HeaderIterator.
| Modifier and Type | Field and Description |
|---|---|
| protected final Header[] | allHeaders
An array of headers to iterate over. |
| protected int | currentIndex
The position of the next header in |
| protected 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 |
|---|---|
| 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 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 |
|---|---|
| protected int currentIndex The position of the next header in | |
| headerName | back to summary |
|---|---|
| protected 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 |
|---|---|
| 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. Removing headers is not supported.
| |