Implementation of a com.good.gd.apache.http.HeaderIterator based on a java.util.List. More...
For use by com.good.gd.apache.http.message.HeaderGroup.
The following notice applies to the original API on which this API is based, and to its documentation. The documentation of this API has been revised from the original.
/* * Copyright (C) 2006 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */
Public Member Functions | |
BasicListHeaderIterator (List headers, String name) | |
Creates a new header iterator. More... | |
boolean | hasNext () |
Indicates whether there is another header in this iteration. More... | |
Header | nextHeader () throws NoSuchElementException |
Obtains the next header from this iteration. More... | |
final Object | next () throws NoSuchElementException |
Returns the next header. More... | |
void | remove () throws UnsupportedOperationException |
Removes the header that was returned last. | |
Protected Member Functions | |
int | findNext (int from) |
Determines the index of the next header. More... | |
boolean | filterHeader (int index) |
Checks whether a header is part of the iteration. More... | |
Protected Attributes | |
final List | allHeaders |
A list of headers to iterate over. More... | |
int | currentIndex |
The position of the next header in allHeaders . More... | |
int | lastIndex |
The position of the last returned header. More... | |
String | headerName |
The header name to filter by. More... | |
BasicListHeaderIterator | ( | List | headers, |
String | name | ||
) |
headers | a list of headers over which to iterate |
name | the name of the headers over which to iterate, or null for any |
|
protected |
from | one less than the index to consider first, -1 to search for the first header |
|
protected |
index | the index of the header to check |
true
if the header should be part of the iteration, false
to skip boolean hasNext | ( | ) |
true
if there is another header, false
otherwise Implements HeaderIterator.
Header nextHeader | ( | ) | throws NoSuchElementException |
NoSuchElementException | if there are no more headers |
Implements HeaderIterator.
final Object next | ( | ) | throws NoSuchElementException |
Same as nextHeader , but not type-safe.
NoSuchElementException | if there are no more headers |
|
protected |
Not all elements of this array are necessarily part of the iteration.
|
protected |
Negative if the iteration is over.
|
protected |
Negative if none has been returned so far.
|
protected |
null
to iterate over all headers in the array.