Package org.apache.http.message
Class BasicListHeaderIterator
- java.lang.Object
-
- org.apache.http.message.BasicListHeaderIterator
-
- All Implemented Interfaces:
Iterator<Object>,HeaderIterator
public class BasicListHeaderIterator extends Object implements HeaderIterator
- Since:
- 4.0
-
-
Constructor Summary
Constructors Constructor Description BasicListHeaderIterator(List<Header> headers, String name)Creates a new header iterator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasNext()Indicates whether there is another header in this iteration.Objectnext()Returns the next header.HeadernextHeader()Obtains the next header from this iteration.voidremove()Removes the header that was returned last.-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Method Detail
-
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
public Header nextHeader() throws NoSuchElementException
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
public final Object next() throws NoSuchElementException
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
public void remove() throws UnsupportedOperationExceptionRemoves the header that was returned last.- Specified by:
removein interfaceIterator<Object>- Throws:
UnsupportedOperationException
-
-