Package org.apache.http.message
Class BasicListHeaderIterator
java.lang.Object
org.apache.http.message.BasicListHeaderIterator
- All Implemented Interfaces:
Iterator<Object>,HeaderIterator
- Since:
- 4.0
-
Constructor Summary
ConstructorsConstructorDescriptionBasicListHeaderIterator(List<Header> headers, String name) Creates a new header iterator. -
Method Summary
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining
-
Constructor Details
-
BasicListHeaderIterator
Creates a new header iterator.- Parameters:
headers- a list of headers over which to iteratename- the name of the headers over which to iterate, ornullfor any
-
-
Method Details
-
hasNext
public boolean hasNext()Description copied from interface:HeaderIteratorIndicates whether there is another header in this iteration.- Specified by:
hasNextin interfaceHeaderIterator- Specified by:
hasNextin interfaceIterator<Object>- Returns:
trueif there is another header,falseotherwise
-
nextHeader
Obtains the next header from this iteration.- Specified by:
nextHeaderin interfaceHeaderIterator- Returns:
- the next header in this iteration
- Throws:
NoSuchElementException- if there are no more headers
-
next
Returns the next header. Same asnextHeader, but not type-safe.- Specified by:
nextin interfaceIterator<Object>- Returns:
- the next header in this iteration
- Throws:
NoSuchElementException- if there are no more headers
-
remove
Removes the header that was returned last.- Specified by:
removein interfaceIterator<Object>- Throws:
UnsupportedOperationException
-